AntoinePrv opened a new pull request, #50056:
URL: https://github.com/apache/arrow/pull/50056

   ### 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
       │   └── run
       │       ├── 84e0ab99
       │       │   ├── benchmark.json
       │       │   └── metadata.json
       │       └── e15e438a
       │           ├── benchmark.json
       │           └── metadata.json
       └── build
           └── run
               ├── 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 avoir 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` direcotory.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to