feat: add build and build-cache task runner benchmark variations#103
Merged
darcyclarke merged 2 commits intomainfrom Apr 30, 2026
Merged
feat: add build and build-cache task runner benchmark variations#103darcyclarke merged 2 commits intomainfrom
darcyclarke merged 2 commits intomainfrom
Conversation
Add two new benchmark variations to the task runner system: - build: install deps, then time `<pm> run build` (cold build, no .next/ cache) - build-cache: install deps + run build once to warm .next/ cache, then time `<pm> run build` again (cached rebuild) Changes: - Add scripts/variations/build.sh and build-cache.sh following run.sh patterns - Add clean_build_output helper to clean-helpers.sh (removes .next/ directory) - Register build/build-cache as available variations in bench CLI - Allow nx/turbo/vp/node package managers for build variations (task runners) - Add build/build-cache to CI workflow matrix (targeting next fixture) - Update generate-chart.js to process build/build-cache result files - Update process-results.sh to copy build/build-cache artifacts - Add build/build-cache to app Variation type, validation, sort order, and task execution category - Default task-runners route now navigates to build instead of run Co-authored-by: Darcy Clarke <darcy@darcyclarke.me>
The warm build step in the prepare phase can fail for some package managers (e.g. vlt). Since hyperfine aborts on non-zero prepare exit codes, add || true to all install and warm build commands in the build-cache prepare steps to let --ignore-failure handle it. Co-authored-by: Darcy Clarke <darcy@darcyclarke.me>
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
Add two new benchmark variations to the task runner system:
build: Install deps, then time<pm> run build(cold build, no.next/cache)build-cache: Install deps + run build once to warm.next/cache, then time<pm> run buildagain (cached rebuild)These measure framework build performance across package managers and task runners (npm, yarn, pnpm, vlt, bun, deno, nx, turbo, node, etc.).
Changes
Benchmark scripts
scripts/variations/build.sh— New variation: installs deps in prepare, cleans.next/before each run, times<pm> run buildscripts/variations/build-cache.sh— New variation: installs deps + runs initial build in prepare (warm cache), times cached rebuildscripts/clean-helpers.sh— Addedclean_build_outputfunction (removes.next/directory), integrated intoclean_allscripts/variations/common.sh— Allow nx/turbo/vp/node for build and build-cache variations (not just run)CLI & CI
bench— Registeredbuildandbuild-cacheinAVAILABLE_VARIATIONSscripts/benchmark.sh— Added case dispatch for both variations.github/workflows/benchmark.yaml— Added build/build-cache to matrix (targetingnextfixture), updated default workflow_dispatch variationsChart & app
scripts/generate-chart.js— Added variations to chart data generationscripts/process-results.sh— Added variations to result processing loopapp/src/types/chart-data.ts— Added toVariationtype andisValidVariationapp/src/lib/utils.ts— Added to task execution category, sort orderapp/src/routes.tsx— Default task-runners route now navigates tobuildCo-authored-by: Darcy Clarke darcy@darcyclarke.me