Skip to content

Commit 43bbcb5

Browse files
Skip queries that fail on every filtered system
When all selected systems return null for a query, the per-query baseline becomes Math.min() over an empty set (Infinity), which makes log(curr/Infinity) = -Infinity and collapses every system's geometric mean to 0 - bars render with width 0 and the chart appears empty. Reproduction: filter to Elasticsearch + Quickwit (Q28's REGEXP_REPLACE fails on both). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 153c080 commit 43bbcb5

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,15 +728,18 @@ <h2>Detailed Comparison</h2>
728728

729729
for (let i = 0; i < num_queries; ++i) {
730730
if (no_queries_selected || selectors.queries[i]) {
731-
const curr_timing = selectRun(elem.result[i], metric) ?? fallback_timing;
732731
const baseline_timing = selectRun(baseline_data[i], metric);
732+
/// Skip queries that fail on every filtered system - otherwise the
733+
/// geometric mean collapses to 0 and no bars render.
734+
if (baseline_timing === null || !isFinite(baseline_timing)) continue;
735+
const curr_timing = selectRun(elem.result[i], metric) ?? fallback_timing;
733736
const ratio = (constant_time_add + curr_timing) / (constant_time_add + baseline_timing);
734737
accumulator += Math.log(ratio);
735738
++used_queries;
736739
}
737740
}
738741

739-
return Math.exp(accumulator / used_queries);
742+
return used_queries > 0 ? Math.exp(accumulator / used_queries) : null;
740743
}
741744

742745
function addNote(text) {

0 commit comments

Comments
 (0)