@@ -32,26 +32,30 @@ sudo $(pixi run -e wheel -- which python) -m pyperf system tune
3232To run the benchmarks combine the environment and task:
3333
3434``` bash
35-
3635# Run the Python benchmarks in the wheel environment
3736pixi run -e wheel bench
3837
3938# Run the Python benchmarks in the source environment
4039pixi run -e source bench
4140
42- # Run the C++ benchmarks (environment is irrelavant here)
41+ # Run the C++ benchmarks
4342pixi run -e wheel bench-cpp
4443```
4544
46- ## pyperf JSON
45+ Both runners automatically save results to JSON files in the benchmarks
46+ directory: ` results-python.json ` and ` results-cpp.json ` .
4747
48- The benchmarks are run using [ pyperf] ( https://pyperf.readthedocs.io/en/latest/ ) .
49- The results are written to a JSON file in the format expected by pyperf.
48+ ## Output JSON and analysis
5049
51- The C++ benchmarks also generate a valid JSON file, in the same format.
50+ The benchmarks are run using [ pyperf] ( https://pyperf.readthedocs.io/en/latest/ ) .
51+ Both Python and C++ results are saved in pyperf-compatible JSON format,
52+ which can be analyzed with pyperf commands:
5253
53- ```
54- pixi run -e wheel bench-cpp -0 cpp.json
54+ ``` bash
55+ # Show results and statistics
56+ pixi run -e wheel -- python -m pyperf stats results-python.json
57+ pixi run -e wheel -- python -m pyperf stats results-cpp.json
5558
56- pixi run -e wheel pyperf stats cpp.json
59+ # Compare C++ vs Python results
60+ pixi run -e wheel -- python -m pyperf compare_to results-cpp.json results-python.json
5761```
0 commit comments