test(core): time the B12 index write as the best of five runs

A single timed run lost the CPU to the rest of the suite running
alongside it and read as the full-scan regression (171 ms against
701 ms). The fastest of five runs still catches the 6x scaling of the
old path.
This commit is contained in:
nvrl committed 2026-10-11 18:56:55 +02:00
1 parent 3e0db8cf46
commit b73cd087aa
1 file changed
+10 -3
+10 -3
View File
@@ -1689,9 +1689,16 @@ fn writing_nodes_does_not_scale_with_the_size_of_the_index() {
.collect();
db.upsert_nodes(&batch).unwrap();
let t = Instant::now();
db.upsert_nodes(&batch).unwrap();
t.elapsed()
// The fastest of a few runs: the rest of the suite runs alongside, and
// one run that lost the CPU to it read as the regression.
(0..5)
.map(|_| {
let t = Instant::now();
db.upsert_nodes(&batch).unwrap();
t.elapsed()
})
.min()
.unwrap()
}
let small = cost_against_index_of(200);