Commit 305dd8a
committed
feat: track spawned processes (execve count) per variation
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` utility1 parent 2cac036 commit 305dd8a
18 files changed
Lines changed: 769 additions & 9 deletions
File tree
- app/src
- components/variation
- hooks
- lib
- types
- scripts
- variations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
49 | 57 | | |
50 | 58 | | |
51 | 59 | | |
| |||
111 | 119 | | |
112 | 120 | | |
113 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
114 | 125 | | |
115 | 126 | | |
116 | 127 | | |
| |||
125 | 136 | | |
126 | 137 | | |
127 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
128 | 146 | | |
129 | 147 | | |
130 | 148 | | |
| |||
137 | 155 | | |
138 | 156 | | |
139 | 157 | | |
| 158 | + | |
140 | 159 | | |
141 | 160 | | |
142 | 161 | | |
| |||
145 | 164 | | |
146 | 165 | | |
147 | 166 | | |
| 167 | + | |
148 | 168 | | |
149 | 169 | | |
150 | 170 | | |
151 | 171 | | |
152 | 172 | | |
153 | 173 | | |
154 | 174 | | |
| 175 | + | |
155 | 176 | | |
156 | 177 | | |
157 | 178 | | |
| |||
161 | 182 | | |
162 | 183 | | |
163 | 184 | | |
| 185 | + | |
164 | 186 | | |
165 | 187 | | |
166 | 188 | | |
| |||
240 | 262 | | |
241 | 263 | | |
242 | 264 | | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
243 | 287 | | |
244 | 288 | | |
245 | 289 | | |
| |||
0 commit comments