Skip to content

feat: group benchmarks in the PR comment and trend dashboard#5

Merged
pedromvgomes merged 2 commits into
mainfrom
feature/benchmark-groups
Jul 20, 2026
Merged

feat: group benchmarks in the PR comment and trend dashboard#5
pedromvgomes merged 2 commits into
mainfrom
feature/benchmark-groups

Conversation

@pedromvgomes

@pedromvgomes pedromvgomes commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Why

The wardnet suite has grown past 30 benchmarks. At that size the PR comment's
single table and the dashboard's flat grid of charts are hard to scan — the few
benchmarks that actually moved get lost in a wall of rows.

What

Fold both views into sections keyed by benchmark group — the leading segment
of a criterion group/function/value id (its benchmark_group). No schema
change: the grouping is derived from ids that already carry it, so recorded
baselines and existing dashboards keep working.

PR comment (internal/report)

  • Each group renders as a collapsible <details> section with a summary line:
    name · size · verdict (⚠️ N slower, 🚀 faster, or ).
  • Sections holding a regression are expanded by default; clean groups collapse,
    so problems stay one glance away and everything else stays out of the way.
  • Row ids drop the redundant group prefix (parse/a, not dns/parse/a) now that
    the section header carries it.
  • A single-group suite still renders the original flat table — small projects see
    no change.

Trend dashboard (web/)

  • Charts are bucketed into the same groups, each a collapsible section with a
    header and count; captions drop the group prefix and the subtitle reports the
    group count.
  • Single-group suites keep the flat grid.
  • Vendored single-file bundle rebuilt so the embedded dashboard matches source.

Ungrouped, top-level benches (ids with no /) collect in a trailing ungrouped
section in both views.

Tests

Added internal/report coverage for the sectioning, prefix stripping, the
single-group flat fallback, per-group verdicts, and ungrouped-last ordering.
go test -race ./..., go vet, gofmt, and the dashboard bundle-drift check
all pass.

A flat table is fine for a handful of benchmarks, but the wardnet suite has
grown past 30 and a single wall of rows drowns the signal. Group deltas by
their leading id segment — criterion's benchmark_group, the "group" in a
group/function/value id — and render each as a collapsible <details> section:
a summary line (name, size, verdict) with the table folded behind it.

Sections that hold a regression open by default so problems stay visible
without a click; clean groups collapse. Row ids drop the redundant group
prefix now that the section header carries it. Suites with a single group
keep the old flat table, so small projects see no change.
Mirror the PR comment's sectioning on the trend dashboard: bucket the charts
by their leading id segment and render each group as a collapsible section
with a header (name + count), so a 30-plus-chart page can be folded down to
the groups a reviewer cares about. Chart captions drop the group prefix the
section header already shows, and the subtitle now reports the group count.

A single-group suite still renders the flat grid. Rebuilt the vendored
single-file bundle so the embedded dashboard matches source.
@pedromvgomes
pedromvgomes merged commit 0ba1bc7 into main Jul 20, 2026
2 checks passed
@pedromvgomes
pedromvgomes deleted the feature/benchmark-groups branch July 20, 2026 07:17
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