diff options
author | eldritch horrors <pennae@lix.systems> | 2024-08-30 19:01:30 +0200 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-08-30 19:01:30 +0200 |
commit | e0fd0ba211b38827627218424f92b7d0e059a626 (patch) | |
tree | 0b0b1cf1f32302f683d7ab1bcd1a7469fc6a3e3c /src/libstore/build/derivation-goal.hh | |
parent | c2b90d235fb5dd721898d8d41d73a51607654890 (diff) |
libstore: use notifications for stats counters
updating statistics *immediately* when any counter changes declutters
things somewhat and makes useful status reports less dependent on the
current worker main loop. using callbacks will make it easier to move
the worker loop into kj entirely, using only promises for scheduling.
Change-Id: I695dfa83111b1ec09b1a54cff268f3c1d7743ed6
Diffstat (limited to 'src/libstore/build/derivation-goal.hh')
-rw-r--r-- | src/libstore/build/derivation-goal.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/build/derivation-goal.hh b/src/libstore/build/derivation-goal.hh index 77f9fef4b..bf4a3da93 100644 --- a/src/libstore/build/derivation-goal.hh +++ b/src/libstore/build/derivation-goal.hh @@ -1,6 +1,7 @@ #pragma once ///@file +#include "notifying-counter.hh" #include "parsed-derivations.hh" #include "lock.hh" #include "outputs-spec.hh" @@ -217,7 +218,7 @@ struct DerivationGoal : public Goal BuildMode buildMode; - std::unique_ptr<MaintainCount<uint64_t>> mcExpectedBuilds, mcRunningBuilds; + NotifyingCounter<uint64_t>::Bump mcExpectedBuilds, mcRunningBuilds; std::unique_ptr<Activity> act; |