diff options
author | eldritch horrors <pennae@lix.systems> | 2024-07-25 18:05:42 +0200 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-07-29 22:16:11 +0000 |
commit | 548c973e8282bbec5b14f3860218b23564dc0381 (patch) | |
tree | 674d469bc6f3ca18649f6cd8afb387668ddac0e9 /src/libstore/build/worker.cc | |
parent | 6abad7cb238c5c7bf59a83bed55e7590c544fc2e (diff) |
libstore: remove Worker::updateProgress
just update progress every time a goal has returned from work(). there
seem to be no performance penalties, and the code is much simpler now.
Change-Id: I288ee568b764ee61f40a498d986afda49987cb50
Diffstat (limited to 'src/libstore/build/worker.cc')
-rw-r--r-- | src/libstore/build/worker.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc index 402cdc5b4..25b20511b 100644 --- a/src/libstore/build/worker.cc +++ b/src/libstore/build/worker.cc @@ -300,6 +300,19 @@ void Worker::run(const Goals & _topGoals) for (auto & goal : awake2) { checkInterrupt(); goal->work(); + + actDerivations.progress( + doneBuilds, expectedBuilds + doneBuilds, runningBuilds, failedBuilds + ); + actSubstitutions.progress( + doneSubstitutions, + expectedSubstitutions + doneSubstitutions, + runningSubstitutions, + failedSubstitutions + ); + act.setExpected(actFileTransfer, expectedDownloadSize + doneDownloadSize); + act.setExpected(actCopyPath, expectedNarSize + doneNarSize); + if (topGoals.empty()) break; // stuff may have been cancelled } } |