aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/worker.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-07-25 18:05:42 +0200
committereldritch horrors <pennae@lix.systems>2024-07-29 22:16:11 +0000
commit548c973e8282bbec5b14f3860218b23564dc0381 (patch)
tree674d469bc6f3ca18649f6cd8afb387668ddac0e9 /src/libstore/build/worker.cc
parent6abad7cb238c5c7bf59a83bed55e7590c544fc2e (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.cc13
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
}
}