Skip to content

fix(store): propagate cpu time from derivation trampoline - #581

Open
CertainLach wants to merge 1 commit into
DeterminateSystems:mainfrom
deltarocks:push-wonwzzzqmouo
Open

fix(store): propagate cpu time from derivation trampoline#581
CertainLach wants to merge 1 commit into
DeterminateSystems:mainfrom
deltarocks:push-wonwzzzqmouo

Conversation

@CertainLach

@CertainLach CertainLach commented Jul 29, 2026

Copy link
Copy Markdown

Motivation

Right daemon doesn't report CPU time after build, build result has empty stats

Context

Summary by CodeRabbit

  • Bug Fixes
    • Improved build result reporting by accurately aggregating completion times, CPU usage, and build counts across related build steps.
    • Build results now provide more consistent timing and resource-use information for composite builds.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c882d109-3804-447c-8dda-5c843c2907cc

📥 Commits

Reviewing files that changed from the base of the PR and between 31bd4f6 and 44d8c06.

📒 Files selected for processing (1)
  • src/libstore/build/derivation-trampoline-goal.cc

📝 Walkthrough

Walkthrough

This change adds aggregation logic to DerivationTrampolineGoal::haveDerivation that combines timing and CPU usage statistics from individual subgoals into the parent build result, including build counts, start/stop times, and CPU user/system time.

Changes

Build metrics aggregation

Layer / File(s) Summary
Aggregate subgoal metrics into buildResult
src/libstore/build/derivation-trampoline-goal.cc
Adds <chrono> include and a loop over concreteDrvGoals that sums timesBuilt, computes earliest non-zero startTime, takes max stopTime, and sums cpuUser/cpuSystem into the parent buildResult.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: propagating CPU time from the derivation trampoline into build results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant