MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / run_bench

Function run_bench

src/bench.rs:78–87  ·  view source on GitHub ↗

Run the bench from a TOML query file on disk.

(
    cg: &TraceDecay,
    queries_path: &Path,
    opts: BenchOptions,
)

Source from the content-addressed store, hash-verified

76
77/// Run the bench from a TOML query file on disk.
78pub 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).

Callers 2

handle_benchFunction · 0.85

Calls 1

run_bench_with_tomlFunction · 0.85

Tested by 1