Commit cb3bd69
authored
### Rationale for this change
Improve workflow when running many benchmarks.
Namely eagerly store results and avoid user having to manage large amount of file names.
### What changes are included in this PR?
With the following code run **twice**,
```bash
archery benchmark run --suite-filter=parquet --benchmark-filter=Decode --preserve --output out.json HEAD --preserve --preserve-dir bench/
```
The `preserve-dir` is used and its internal structure is as follows.
```
bench
└── 0202ab5295fee14c6c7b85b05ca78cc5c281b3a5
├── arrow
│ └── // Source files...
├── bench
│ ├── 84e0ab99
│ │ ├── benchmark.json
│ │ └── metadata.json
│ └── e15e438a
│ ├── benchmark.json
│ └── metadata.json
└── build
├── 84e0ab99
│ └── // Cmake build files...
└── e15e438a
└── // Cmake build files...
```
The commit is uniquerly resolved source is reused between runs.
Separate invocation results in separate builds and benchmark execution.
The idea would be to be able to reuse the build dir but it is tricky to tell when it should be changed (If CLI params are different? If environment var change? If dependencies change?).
The idea is to get started minimally without to much maintenance.
Metadata are also a starting point to avoid forgetting what a (costly!) run was about.
Example from current run:
```json
{
"time": "2026-05-27T13:58:02.792064+00:00",
"cmd": {
"full": "archery benchmark run --suite-filter=parquet --benchmark-filter=Decode --preserve --output out.json HEAD --preserve --preserve-dir bench/",
"params": {
"suite_filter": "parquet",
"benchmark_filter": "Decode",
"preserve": true,
"output": "<unopened file 'out.json' w>",
"preserve_dir": ".../arrow/bench",
"rev_or_path": "HEAD",
"cpp_benchmark_extras": [],
"cmake_extras": [],
"benchmark_extras": [],
"build_extras": [],
"language": "cpp",
"src": ".../arrow",
"cpp_package_prefix": null,
"cxx_flags": null,
"cxx": null,
"cc": null,
"java_options": null,
"java_home": null,
"repetitions": -1,
"repetition_min_time": null
}
},
"machine_info": {
"platform": "macOS-26.5-arm64-arm-64bit-Mach-O",
"system": "Darwin",
"release": "25.5.0",
"version": "Darwin Kernel Version 25.5.0: Mon Apr 27 20:41:06 PDT 2026; root:xnu-12377.121.6~2/RELEASE_ARM64_T6030",
"machine": "arm64",
"processor": "arm",
"architecture": "64bit",
"logical_cores": 12
}
}
```
### Are these changes tested?
Yes
### Are there any user-facing changes?
Archery user that looked into the `--preserve` directory.
* GitHub Issue: #49913
Authored-by: AntoinePrv <AntoinePrv@users.noreply.github.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
1 parent 72a970f commit cb3bd69
3 files changed
Lines changed: 125 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
31 | 54 | | |
32 | 55 | | |
33 | 56 | | |
| |||
47 | 70 | | |
48 | 71 | | |
49 | 72 | | |
| 73 | + | |
50 | 74 | | |
51 | 75 | | |
52 | 76 | | |
| |||
108 | 132 | | |
109 | 133 | | |
110 | 134 | | |
111 | | - | |
| 135 | + | |
| 136 | + | |
112 | 137 | | |
| 138 | + | |
113 | 139 | | |
114 | 140 | | |
115 | | - | |
| 141 | + | |
| 142 | + | |
116 | 143 | | |
117 | 144 | | |
118 | 145 | | |
| |||
217 | 244 | | |
218 | 245 | | |
219 | 246 | | |
220 | | - | |
221 | | - | |
222 | | - | |
| 247 | + | |
223 | 248 | | |
224 | | - | |
| 249 | + | |
225 | 250 | | |
| 251 | + | |
| 252 | + | |
226 | 253 | | |
227 | | - | |
228 | | - | |
229 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
230 | 258 | | |
231 | | - | |
232 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
233 | 274 | | |
234 | 275 | | |
235 | 276 | | |
| |||
310 | 351 | | |
311 | 352 | | |
312 | 353 | | |
313 | | - | |
314 | | - | |
315 | | - | |
| 354 | + | |
316 | 355 | | |
317 | | - | |
| 356 | + | |
318 | 357 | | |
319 | 358 | | |
320 | | - | |
321 | | - | |
322 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
323 | 363 | | |
324 | 364 | | |
325 | 365 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
44 | 67 | | |
45 | 68 | | |
46 | 69 | | |
| |||
305 | 328 | | |
306 | 329 | | |
307 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
308 | 336 | | |
309 | 337 | | |
310 | 338 | | |
| |||
347 | 375 | | |
348 | 376 | | |
349 | 377 | | |
350 | | - | |
351 | | - | |
352 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
353 | 381 | | |
354 | 382 | | |
355 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
356 | 386 | | |
357 | 387 | | |
358 | 388 | | |
| |||
392 | 422 | | |
393 | 423 | | |
394 | 424 | | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
399 | 430 | | |
400 | 431 | | |
401 | 432 | | |
| |||
433 | 464 | | |
434 | 465 | | |
435 | 466 | | |
436 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
437 | 470 | | |
438 | 471 | | |
439 | 472 | | |
| |||
465 | 498 | | |
466 | 499 | | |
467 | 500 | | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
468 | 512 | | |
469 | 513 | | |
470 | 514 | | |
| |||
486 | 530 | | |
487 | 531 | | |
488 | 532 | | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
494 | 538 | | |
495 | 539 | | |
496 | 540 | | |
| |||
564 | 608 | | |
565 | 609 | | |
566 | 610 | | |
567 | | - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
568 | 614 | | |
569 | 615 | | |
570 | 616 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| |||
0 commit comments