feat: track spawned processes (execve count) per variation#69
Merged
darcyclarke merged 1 commit intovltpkg:mainfrom Mar 11, 2026
Merged
Conversation
Add a new 'Spawned Processes' data point that counts the number of processes each package manager spawns (via execve syscalls) during install. This is captured per-variation since different states (clean, cache, lockfile, etc.) may produce different process counts. ## How it works After each benchmark completes, a separate strace run is performed for each package manager under the same variation state: 1. `process-count.sh` — wraps a single install with `strace -f -e trace=execve` and counts execve() calls 2. `collect-process-count.js` — aggregates per-PM counts into `process-count.json` (same format as package-count.json) 3. `collect_process_count` in common.sh — orchestrates the strace runs for all included PMs using BENCH_PREPARE_BASE + setup commands The strace run is separate from the timed benchmark to avoid overhead. ## Backend changes - `scripts/process-count.sh` — new: strace wrapper per PM - `scripts/collect-process-count.js` — new: aggregation script - `scripts/variations/common.sh` — extracted bare BENCH_INSTALL_* commands (no log redirects) for reuse; added collect_process_count() - All 8 standard variation scripts — call collect_process_count - `scripts/process-results.sh` — copy process-count.json to results - `scripts/setup.sh` — ensure strace is installed ## Frontend changes - `ProcessCountData` / `ProcessCountTableRow` types - `use-process-count-data.ts` hook (mirrors use-package-count-data) - `ProcessCountTable` component with Terminal icon, sortable columns, locale-formatted numbers - Integrated into variation page below Package Count Data - `getAvailablePackageManagersFromProcessCount` utility
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.
Adds a new Spawned Processes data point that counts the number of processes each package manager spawns (via
execvesyscalls) during install. This varies by state/variation, so it's captured for each one — just like package count data.How it works
After the hyperfine benchmark completes for each variation, a separate strace run is performed for each PM under the same state:
scripts/process-count.sh— wraps a single install withstrace -f -e trace=execve, countsexecve()calls in the outputscripts/collect-process-count.js— aggregates per-PM counts intoprocess-count.json(same format aspackage-count.json:{ "npm": { "count": 42 }, ... })collect_process_count()incommon.sh— orchestrates the strace runs, using the variation'sBENCH_PREPARE_BASE+ per-PM setup commands to replicate the correct stateThe strace run is separate from the timed benchmark so it doesn't affect timing measurements.
Backend
process-count.sh,collect-process-count.jscommon.sh: extracted bareBENCH_INSTALL_*commands (no log redirection) for reuse by both hyperfine and strace; addedcollect_process_count()collect_process_countaftercollect_package_countprocess-results.sh: copiesprocess-count.jsonto dated + latest resultssetup.sh: ensuresstraceis installedFrontend
ProcessCountData,ProcessCountTableRowuse-process-count-data.ts(fetches/latest/<fixture>-<variation>-process-count.json)ProcessCountTable— sortable table withTerminalicon, locale-formatted numbersgetAvailablePackageManagersFromProcessCountNotes
straceis unavailable, the collection step is silently skipped (no-op).