Add metric for builds waiting for download slot

(cherry picked from commit f23ec71227911891807706b6b978836e4d80edde)
This commit is contained in:
K900
2024-10-01 19:14:24 +03:00
committed by ahuston-0
parent 37744c7018
commit e15070c6c2
3 changed files with 3 additions and 0 deletions

View File

@@ -540,6 +540,7 @@ void State::buildRemote(ref<Store> destStore,
/* Throttle CPU-bound work. Opportunistically skip updating the current
* step, since this requires a DB roundtrip. */
if (!localWorkThrottler.try_acquire()) {
MaintainCount<counter> mc(nrStepsWaitingForDownloadSlot);
updateStep(ssWaitingForLocalSlot);
localWorkThrottler.acquire();
}