Skip to content

feat: add build and build-cache task runner benchmark variations#103

Merged
darcyclarke merged 2 commits intomainfrom
feat/build-cache-variations
Apr 30, 2026
Merged

feat: add build and build-cache task runner benchmark variations#103
darcyclarke merged 2 commits intomainfrom
feat/build-cache-variations

Conversation

@vltbaudbot
Copy link
Copy Markdown
Contributor

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 build again (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 build
  • scripts/variations/build-cache.sh — New variation: installs deps + runs initial build in prepare (warm cache), times cached rebuild
  • scripts/clean-helpers.sh — Added clean_build_output function (removes .next/ directory), integrated into clean_all
  • scripts/variations/common.sh — Allow nx/turbo/vp/node for build and build-cache variations (not just run)

CLI & CI

  • bench — Registered build and build-cache in AVAILABLE_VARIATIONS
  • scripts/benchmark.sh — Added case dispatch for both variations
  • .github/workflows/benchmark.yaml — Added build/build-cache to matrix (targeting next fixture), updated default workflow_dispatch variations

Chart & app

  • scripts/generate-chart.js — Added variations to chart data generation
  • scripts/process-results.sh — Added variations to result processing loop
  • app/src/types/chart-data.ts — Added to Variation type and isValidVariation
  • app/src/lib/utils.ts — Added to task execution category, sort order
  • app/src/routes.tsx — Default task-runners route now navigates to build

Co-authored-by: Darcy Clarke darcy@darcyclarke.me

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>
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.

3 participants