Merge pull request 'Add metric for builds waiting for download slot' (#9) from waiting-metrics into main
Reviewed-on: #9 Reviewed-by: raito <raito@noreply.git.lix.systems>
This commit is contained in:
commit
d3257e4761
|
@ -625,6 +625,7 @@ void State::buildRemote(ref<Store> destStore,
|
||||||
/* Throttle CPU-bound work. Opportunistically skip updating the current
|
/* Throttle CPU-bound work. Opportunistically skip updating the current
|
||||||
* step, since this requires a DB roundtrip. */
|
* step, since this requires a DB roundtrip. */
|
||||||
if (!localWorkThrottler.try_acquire()) {
|
if (!localWorkThrottler.try_acquire()) {
|
||||||
|
MaintainCount<counter> mc(nrStepsWaitingForDownloadSlot);
|
||||||
updateStep(ssWaitingForLocalSlot);
|
updateStep(ssWaitingForLocalSlot);
|
||||||
localWorkThrottler.acquire();
|
localWorkThrottler.acquire();
|
||||||
}
|
}
|
||||||
|
|
|
@ -613,6 +613,7 @@ void State::dumpStatus(Connection & conn)
|
||||||
{"nrActiveSteps", activeSteps_.lock()->size()},
|
{"nrActiveSteps", activeSteps_.lock()->size()},
|
||||||
{"nrStepsBuilding", nrStepsBuilding.load()},
|
{"nrStepsBuilding", nrStepsBuilding.load()},
|
||||||
{"nrStepsCopyingTo", nrStepsCopyingTo.load()},
|
{"nrStepsCopyingTo", nrStepsCopyingTo.load()},
|
||||||
|
{"nrStepsWaitingForDownloadSlot", nrStepsWaitingForDownloadSlot.load()},
|
||||||
{"nrStepsCopyingFrom", nrStepsCopyingFrom.load()},
|
{"nrStepsCopyingFrom", nrStepsCopyingFrom.load()},
|
||||||
{"nrStepsWaiting", nrStepsWaiting.load()},
|
{"nrStepsWaiting", nrStepsWaiting.load()},
|
||||||
{"nrUnsupportedSteps", nrUnsupportedSteps.load()},
|
{"nrUnsupportedSteps", nrUnsupportedSteps.load()},
|
||||||
|
|
|
@ -397,6 +397,7 @@ private:
|
||||||
counter nrStepsDone{0};
|
counter nrStepsDone{0};
|
||||||
counter nrStepsBuilding{0};
|
counter nrStepsBuilding{0};
|
||||||
counter nrStepsCopyingTo{0};
|
counter nrStepsCopyingTo{0};
|
||||||
|
counter nrStepsWaitingForDownloadSlot{0};
|
||||||
counter nrStepsCopyingFrom{0};
|
counter nrStepsCopyingFrom{0};
|
||||||
counter nrStepsWaiting{0};
|
counter nrStepsWaiting{0};
|
||||||
counter nrUnsupportedSteps{0};
|
counter nrUnsupportedSteps{0};
|
||||||
|
|
Loading…
Reference in a new issue