charts: group all Params variants into one chart per benchmark#1861
Merged
Conversation
added 6 commits
June 5, 2026 17:27
Default 'Featured Benchmarks' view previously hardcoded each entry to (Params: None), hiding ACL / AOF / AAD lines that are present in data.js. Refactor the chart renderer to group bench entries by their base name (strip the trailing '(Params: ...)' suffix) and render one chart per base with one colored line per Params variant.
- FEATURED_BENCHMARKS entries are now base names only (e.g. 'Operations.BasicOperations.InlinePing'); the includes() match attracts all variants automatically.
- New parseBenchmarkName helper splits 'Foo(Params: X)' into {base, params}; null params falls back to the legacy '(no params)' label.
- renderGraph accepts a Map<params, datapoints[]>, unions all commit ids across variants for the x-axis (older variants like None have longer histories; newer ones like AAD start partway through and render as gaps via spanGaps:true), and emits one Chart.js dataset per variant with a stable per-Params color (None=green, ACL=blue, AOF=orange, AAD=red, fallback palette for the rest).
- renderBenchSet now groups benchSet entries by base name before invoking renderGraph; FEATURED filter compares against the base name so all Params variants pass through.
- Legend is shown when a chart has >1 dataset; tooltips include the Params label.
Net effect: visiting https://microsoft.github.io/garnet/charts/ now shows ACL / AOF / AAD lines on every Featured benchmark, on the same plot as None — making regressions in any Params variant immediately visible.
Follow-up to the per-Params grouping change in 71af47d. The Benchmark dropdown still listed every '(Params: X)' variant as a separate option, so selecting one would force the chart back to a single-variant view — defeating the grouping when the user wanted to focus on one benchmark. - populateBenchmarkSelector now dedupes by base name (using parseBenchmarkName) so each benchmark appears exactly once in its optgroup. - renderBenchSet's SELECTED_BENCHMARK filter now compares against the base name instead of the full bench name, so selecting 'Operations.BasicOperations.InlinePing' shows one chart with all Params variants (None / ACL / AOF / AAD) instead of zero matches. - Net UX: pick a matrix entry from Benchmark Group → pick a base benchmark from Benchmark → see one focused chart with every Params variant on it. - Caveat: old shareable URLs that encoded '(Params: X)' suffixes in the ?benchmark= param will silently fall back to 'All' since the option values no longer match. Acceptable for this UI improvement; can be added as a URL-back-compat shim if needed.
When the user selects a Benchmark Group (a matrix entry like 'Operations.BasicOperations (ubuntu-latest net10.0 Release)'), the surrounding h4 displays the matrix entry name but the individual charts within (InlinePing, Set, GetFound, Increment, IncrementBy) were visually indistinguishable — same group heading, no per-chart label. renderGraph now wraps each canvas in a div with an h5 sub-heading showing the leaf name (everything after the last '.'); the parent h4 already carries the package context so 'Operations.BasicOperations.InlinePing' renders as just 'InlinePing'. Hover tooltip on the heading shows the fully-qualified base name.
HTML optgroup labels are not clickable on their own. In the Featured view, the user wanted to be able to click a group header (e.g. 'Operations.RawStringOperations (ubuntu-latest net10.0 Release)') to focus on just that group's charts — previously the only way was to switch the upper Benchmark Group dropdown manually. - Each optgroup now begins with a selectable '(All benchmarks in this group)' option whose value is prefixed with 'GROUP:'. - The benchmark-selector change handler detects the GROUP: prefix and atomically (a) switches the Benchmark Group dropdown to that matrix entry, (b) resets Benchmark to 'All', (c) repopulates and re-renders. Same outcome as manually picking the matrix entry from the top dropdown, just discoverable directly from the optgroup header.
…own" This reverts commit 4450c15.
Pure cleanup commit — no behavior change. Reduces the cumulative PR diff so reviewers see less code: - Trim verbose multi-line comments to one-liners; comments now point at non-obvious intent only. - Collapse the PARAMS_COLORS + fallback-palette + assignment counter into one shared PARAMS_PALETTE array indexed by a tiny dict for known names plus a Map for unknowns. - parseBenchmarkName is now a single expression with the colon-position math inline. - renderGraph: drop the redundant wrapper div (h5 + canvas are direct siblings of parent); extract a shared lookupDp helper for the tooltip callbacks; use optional chaining / ?? for the data-mapping and unit-pickup; tightened onClick to a one-liner. - renderBenchSet: drop noisy comments; rewrite filter as flat continues; remove the lowercase() call inside FEATURED_BENCHMARKS.some() (FEATURED_BENCHMARKS is already lowercased at definition).
This was referenced Jun 6, 2026
badrishc
pushed a commit
that referenced
this pull request
Jun 6, 2026
…#1863) * Revert "charts: group all Params variants into one chart per benchmark (#1861)" This reverts commit b89cc9e. * charts: add AAD variants for Operations.* benchmarks to Featured PR #1859 added Params: AAD as a 4th first-class OperationParams variant. The Featured Benchmarks view didn't surface the new AAD charts because FEATURED_BENCHMARKS only listed the (Params: None) entry for each benchmark. Add the 8 corresponding (Params: AAD) entries for the Operations.* benchmarks that gained an AAD variant. Network.* and Lua.* are unchanged since OperationsBase's useAad flag only applies to the Operations.* hierarchy. --------- Co-authored-by: Tiago Napoli <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Garnet benchmark charts at https://microsoft.github.io/garnet/charts/ hide every Params variant except
None. TheFEATURED_BENCHMARKSconstant was hardcoded with explicit(Params: None)suffixes:data.jsalready contains the per-Params entries (Operations.BasicOperations.InlinePing(Params: ACL),(Params: AOF), soon(Params: AAD)from #1859) but the default view never surfaces them. Users have to manually pick each variant from the dropdown to see it — and even then each variant gets its own separate chart, so cross-variant regressions are invisible.This blocks the value of #1859: the whole point of adding
Params: AADwas so a future AAD-path regression like theDateTime.UtcNowone (fixed in #1855) would be visible immediately on the public charts. With the current renderer, the AAD line would appear only if you knew to click into it.Fix
Render one chart per base benchmark name, with one colored line per Params variant. Same number of charts as before; up to 4× more information per chart.
FEATURED_BENCHMARKS— entries are now base names (e.g.Operations.BasicOperations.InlinePing), no(Params: …)suffix. Theincludes()match then attracts all variants automatically.parseBenchmarkName(fullName)— new helper that splitsFoo(Params: X)into{base, params}. Returns{base: fullName, params: null}for legacy entries without a Params suffix.renderGraph(parent, baseName, variants)— refactored to accept aMap<params|null, datapoints[]>. Unions all commit IDs across variants for the x-axis; older variants (None) have longer histories and newer ones (AAD) start mid-axis, rendered as connected gaps viaspanGaps: true. Emits one Chart.js dataset per variant with stable per-Params colors:None→ green (matches the existing BDN color)ACL→ blueAOF→ orangeAAD→ redrenderBenchSet— groups bench entries by base name before rendering; FEATURED filter compares against the base name so all Params variants pass through.AAD: 1048 ns (±5 ns)).Result
After this change, the default Featured Benchmarks view will show, for example:
Operations.BasicOperations.InlinePingchart with four lines:That's the symmetry the original reviewer was asking for in #1855: regressions on any auth/AOF path are visible at a glance, on the same plot as the baseline.
Implementation notes
website/static/charts/index.htmlonly. No data format change, no infrastructure change.data.jsis untouched and continues to be appended bybenchmark-action/github-action-benchmarkas today.TOOL_COLORSpalette is retained but the per-Params palette overrides it for grouped charts (still used as a fallback elsewhere).(Params: …)suffix (older benchmarks) get a single line labeled(no params), no regression.Testing
Verified locally by serving the modified
index.htmlviapython -m http.server(sofetch()tohttps://microsoft.github.io/garnet/charts/data.jsand/data_net80.jssucceeds —file://would have been blocked by CORS). The page loads, renders, and the Featured view shows all Params variants of each benchmark grouped into single charts.Branch note
This branch is based on
continuousbenchmarkbecauseindex.htmllives there (alongsidedata.js). The branch will need to be merged intocontinuousbenchmark(notmain) for the change to take effect on the deployed charts site.