Run the bench from a TOML query file on disk.
(
cg: &TraceDecay,
queries_path: &Path,
opts: BenchOptions,
)
| 76 | |
| 77 | /// Run the bench from a TOML query file on disk. |
| 78 | pub async fn run_bench( |
| 79 | cg: &TraceDecay, |
| 80 | queries_path: &Path, |
| 81 | opts: BenchOptions, |
| 82 | ) -> Result<BenchReport> { |
| 83 | let raw = std::fs::read_to_string(queries_path).map_err(|e| TraceDecayError::Config { |
| 84 | message: format!("failed to read query file {}: {e}", queries_path.display()), |
| 85 | })?; |
| 86 | run_bench_with_toml(cg, &raw, opts).await |
| 87 | } |
| 88 | |
| 89 | /// Run the bench from an in-memory TOML string. Used by the CLI's default path |
| 90 | /// (avoids a filesystem dependency on the embedded query set). |