bench-incremental: add nix-dynamic tools (experimental builder)#120
Closed
aldoborrero wants to merge 3 commits intomainfrom
Closed
bench-incremental: add nix-dynamic tools (experimental builder)#120aldoborrero wants to merge 3 commits intomainfrom
aldoborrero wants to merge 3 commits intomainfrom
Conversation
Adds nix-dynamic and nix-dynamic-nocgo to the tool set so the touch-a-file incremental benchmark can compare default-mode (dag) against buildGoApplicationExperimental (recursive-nix + dynamic-derivations + ca-derivations) on the same fixture and rooted store. The dynamic expr wraps app.target in a runCommand so the existing instantiate→realise flow in nixTool.build needs no special-casing. A once-per-run probe step builds each requested tool; dynamic tools are dropped with a SKIP notice if the probe fails (mirrors benchmark-build's ca-derivations skip), while dag tools keep failing fast. writeNixExpr now takes the template as a parameter so both templates share one Sprintf. :house: Remote-Dev: homespace
Benchmark Regression Check
Baseline: |
- benchmarking.md: "silently drops" → "drops with a SKIP notice" (the probe prints the reason). - nix-dynamic-nocgo: pass CGO_ENABLED as "0" to match the dag-mode templates. dynamic/default.nix already toString-coerces so the int worked, but keep the four call sites uniform. :house: Remote-Dev: homespace
🏠 Remote-Dev: homespace
Member
Author
|
Closing — #121 refactored bench-incremental to a |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
nix-dynamicandnix-dynamic-nocgotobench-incrementalso the touch-and-rebuild benchmark can compare default-mode (dag) againstbuildGoApplicationExperimental(recursive-nix + dynamic-derivations + ca-derivations) on the same fixture and rooted local store.app.targetinrunCommandso the existingnix-instantiate→nix-store --realiseflow innixTool.buildworks unchanged.SKIPnotice (mirrorsbenchmark-build's ca-derivations skip), dag tools still fail fast.writeNixExprnow takes the template string so both templates share oneSprintf.--toolshelp anddocs/src/benchmarking.mdupdated, with the local-only /recursive-nixsystem-feature caveat.Sample output (light fixture, leaf scenario)
The 4 drvs for dynamic on a leaf touch are wrapper + resolved-link + the changed package + the runCommand symlink — fixed per-touch overhead regardless of edit depth, which is exactly what the comparison is meant to surface.
Test plan
go build && go vetingo/bench-incrementalnix build .#checks.x86_64-linux.{formatting,bench-incremental-help}bench-nix-dynamic-nocgo.nixproduces a working static binary--tools nix-nocgo,nix-dynamic-nocgocontinues with the survivor