mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-07-12 03:12:11 +02:00
fix(bench): honor --baseline in nearest-prefilter
Greptile follow-up: the scenario ignored the flag and ran the full query loop, so a baseline/delta pair measured ~0 instead of the queries' memory cost. Baseline now exits after seeding + optimize, matching merge-all-changed's shape.
This commit is contained in:
parent
c6b4a6ce2b
commit
dd67adccd9
1 changed files with 11 additions and 0 deletions
|
|
@ -487,6 +487,17 @@ async fn nearest_prefilter(args: &Args) -> serde_json::Value {
|
|||
db.optimize().await.expect("optimize");
|
||||
let optimize_ms = optimize_start.elapsed().as_millis() as u64;
|
||||
|
||||
if args.baseline {
|
||||
// Identical workload minus the measured query loop — see
|
||||
// Args::baseline (the peak-RSS delta isolates the queries' cost).
|
||||
return serde_json::json!({
|
||||
"seed_ms": seed_ms,
|
||||
"optimize_ms": optimize_ms,
|
||||
"hit_rows": hit_rows,
|
||||
"baseline": true,
|
||||
});
|
||||
}
|
||||
|
||||
// Query vector = +e1 (the "miss" cluster's pole): the global ANN top-k is
|
||||
// dominated by non-matching rows by construction.
|
||||
let mut query_vec = vec![0.0f32; args.dims];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue