Skip to content

Fix the missing first bar in the summary chart - #1789

Merged
alexey-milovidov merged 1 commit into
mainfrom
fix-summary-baseline-threshold
Sep 4, 2026
Merged

Fix the missing first bar in the summary chart#1789
alexey-milovidov merged 1 commit into
mainfrom
fix-summary-baseline-threshold

Conversation

@alexey-milovidov

Copy link
Copy Markdown
Member

The first bar does not render in this view (CedarDB (Parquet) + ClickHouse (Parquet), combined metric).

Cause

The baseline for the load time and data size components of the combined metric was computed over entries passing a strictly-greater threshold, while the components themselves are applied to entries passing a greater-or-equal one:

const min_load_time = Math.min(...filtered_data.map(elem => elem.load_time).filter(x => x && x > 5));
...
combined_load_time_share * Math.log(elem.load_time >= 5 ? (elem.load_time / min_load_time) : 1)

In that selection every load time is 0, 1, 3 or 5 — nothing is > 5, so Math.min of an empty list returns Infinity. CedarDB (Parquet) on c6a.4xlarge loads in exactly 5s, which does satisfy >= 5, so its load time factor became 5 / Infinity == 0, Math.log(0) == -Infinity, and the whole combined score collapsed to exp(-Infinity) == 0. A ratio of 0 sorts first and renders a bar of zero width.

Fix

Make the thresholds match the conditions that consume them. The load time row of the detailed table already used >= 5 for the same purpose, which confirms the intended boundary.

With the fix, CedarDB (Parquet) on c6a.4xlarge scores ×2.44 and sorts last, consistent with its cold and hot ratios of 2.24 and 3.37.

Effect on the default view

min_load_time goes from 6 to 5, so entries with a counted load time shift by a uniform (6/5)^0.1 ≈ 1.8%. That swaps a handful of adjacent near-ties but changes nothing structural, and it is the correct baseline — a 5s load was always eligible to be counted.

🤖 Generated with Claude Code

The baseline for the load time and data size components of the combined
metric was computed over entries passing a strictly-greater threshold,
while the components themselves are applied to entries passing a
greater-or-equal one:

    const min_load_time = Math.min(... .filter(x => x && x > 5));
    ...
    Math.log(elem.load_time >= 5 ? (elem.load_time / min_load_time) : 1)

When no selected entry has a load time above 5s, `Math.min` of an empty
list is `Infinity`, so an entry with a load time of exactly 5s got
`5 / Infinity == 0`, and the whole combined score collapsed to
`exp(-Infinity) == 0`. It then sorted to the top and rendered a bar of
zero width.

Reproducer: CedarDB (Parquet) and ClickHouse (Parquet) selected together
on c6a.4xlarge / c7a.metal-48xl / c8g.metal-48xl with the combined
metric - CedarDB (Parquet) on c6a.4xlarge loads in exactly 5s. With this
change it scores x2.44 and sorts last, matching its cold and hot ratios
of 2.24 and 3.37.

Make the thresholds match the conditions that consume them. The load
time row of the detailed table already used `>= 5` for the same purpose.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@alexey-milovidov alexey-milovidov self-assigned this Sep 4, 2026
@alexey-milovidov
alexey-milovidov merged commit 66940e8 into main Sep 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant