The bencher run --file parameter accepts only literal file paths. When a benchmark harness writes its output to files created during the run (with paths not known ahead of time), there is no way to point bencher run at them in a single invocation.
Motivation
Note for gungraun this requires #962. Tools like gungraun support --save-summary=json, which writes machine-readable JSON summaries to target/gungraun/** during the benchmark run. The exact paths include benchmark names, functions, ids, ..., so they cannot be predicted before the run starts.
The natural invocation would be:
bencher run --adapter rust_gungraun_json --file 'target/gungraun/**/summary.json' \
"cargo bench -- --save-summary=json"
But this fails today because:
- Bencher does not expand glob patterns
- Shell glob expansion happens at argument parse time, before the benchmark command runs, so it cannot see files that do not exist yet.
Proposed behavior
Allow --file to accept glob patterns, expanded at read time (after the benchmark command completes). This would make the workflow above work as written and generalizes to any tool that writes reports to a directory tree.
Workaround
Run the benchmark outside of bencher run, then invoke bencher with the already-resolved paths:
cargo bench -- --save-summary=json
bencher run --adapter rust_gungraun_json \
$(find target/gungraun -name 'summary.json' | sed 's/^/--file /')
This loses bencher's command wrapping and exit code propagation into the run result.
The
bencher run --fileparameter accepts only literal file paths. When a benchmark harness writes its output to files created during the run (with paths not known ahead of time), there is no way to pointbencher runat them in a single invocation.Motivation
Note for
gungraunthis requires #962. Tools likegungraunsupport--save-summary=json, which writes machine-readable JSON summaries totarget/gungraun/**during the benchmark run. The exact paths include benchmark names, functions, ids, ..., so they cannot be predicted before the run starts.The natural invocation would be:
But this fails today because:
Proposed behavior
Allow
--fileto accept glob patterns, expanded at read time (after the benchmark command completes). This would make the workflow above work as written and generalizes to any tool that writes reports to a directory tree.Workaround
Run the benchmark outside of
bencher run, then invoke bencher with the already-resolved paths:cargo bench -- --save-summary=json bencher run --adapter rust_gungraun_json \ $(find target/gungraun -name 'summary.json' | sed 's/^/--file /')This loses bencher's command wrapping and exit code propagation into the run result.