nix-output-monitor
nix-output-monitor copied to clipboard
[feature request] aggregrated historical time
When the time taken by previous builds of some of the dependencies is known, would it be possible to display the sum? It can be understood as a lower bound on the time we can expect the whole build to take.
Interesting idea. That would be a really cool feature. Maybe we can even combine it with download speed predictions. The main problem I see is potential concurrency. Potentially all dependencies can be built in parallel, then summing up their build times is a gross over approximation.
True, I had not thought of that. For usage as a lower bound, it is correct to just divide by max-jobs (output by nix show-config) Another possibility since you have the dependency graph is to just compute one (out of the many possible) scheduling and use that as an estimate.
Well, I guess the most awesome thing to do would be to calculate the estimated duration for every dependency chain. So when a node has multiple dependencies, we always take the maximum of the estimated wait time for all their direct children as the estimate.
This will require a bit of a refactoring, since currently we only look up estimated times from the database once a build starts, but yeah, this would be very cool. It might also help with sorting the build tree smarter.