Skip to content

ci: skip the daily performance run when nothing it measures changed - #796

Merged
szibis merged 2 commits into
mainfrom
ci/perf-daily-skip-unchanged
Oct 21, 2026
Merged

szibis merged 2 commits into
mainfrom
ci/perf-daily-skip-unchanged

Conversation

@szibis

@szibis szibis commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

The scheduled daily performance run (perf-daily.yaml) measured main every day: a 4-hour A/B that then updated or opened the daily report pull request, even when nothing it measures had changed since the previous day. A scheduled run now skips, with no build, no run, and no new or updated pull request, when nothing it measures has changed on main since the commit the last full daily measurement used. While a daily pull request is open, its unmerged days count. A manual dispatch always runs.

Changes

  • bench/ab/history.py last-commit prints the commit that the newest full measurement of every current set used.

    • Only the sets in bench/ab/shapes.json count, so a renamed or removed set's old history file cannot disable the skip.
    • A line counts only if it was a full daily measurement: the daily run count (7, now one constant shared by daily.py) and every range of the set up to 24h. A cut-down manual run therefore does not count as a measurement.
    • If any current set has no full line, it prints nothing and the run goes ahead.
  • perf-daily.yaml: after the existing carry-history step, a scheduled run compares that commit with HEAD over what a day measures:

    • cmd/, internal/, pkg/, go.mod, go.sum;
    • bench/ab/ without its results, history, tests and README;
    • the stack's compose file, the Loki config and the log generator;
    • the workflow itself.

    Go test files (**/*_test.go) are excluded. If nothing changed, the build, run, report and pull-request steps are skipped, and the job summary says why. A history read error falls back to running. Go setup moves after the check (still 1.27.3, cache: false), so a skipped day does not install Go.

  • bench/ab/README.md, and a CHANGELOG entry under CI.

Proofs

  • Gate logic against real commits:
    • the 2026-10-21 run's commit 5c6dfed3 compared with a main that has only report and metadata changes since: skip;
    • compared with main after a proxy change: run;
    • no history, or a commit not in the repository: run;
    • a test-only Go commit: skip (git diff --quiet returns 0 with the exclude, 1 without);
    • a production change: run.
  • Unit tests: python3 -m unittest discover -s bench/ab/tests passes 100 tests. New cases cover agreeing sets, a stale set file, too few runs, too short a range, a set never fully measured, and lines without a commit.
  • Gates: scripts/ci/tests: 77 pass. actionlint (pinned and local), zizmor 1.30.1 (pinned, no findings), and the conformance and changelog gates.

Not applicable: no proxy code changes, so e2e vs Loki, the Grafana range matrix, visual proof, A/B, benchstat and the load test do not apply. The workflow's own pull-request validation job runs on this PR.

@szibis
szibis force-pushed the ci/perf-daily-skip-unchanged branch from 3a3ab7d to a6312cd Compare October 21, 2026 17:58
@github-actions github-actions Bot added size/M Medium change scope/ci CI/CD scope/docs Documentation maintenance Maintenance labels Oct 21, 2026
… ratchet (#798)

The daily run only recorded numbers, so a result that started differing
from Loki or a query that started failing waited for someone to read the
trend. `history.py alerts` compares each set's newest history line with the
previous valid one and reports transitions, not the state many rows are
already in:

- regression: result same -> differs; status 200 -> an error Loki does not
  give; warm p50 slower beyond the 25% / 50 ms noise rule that held for two
  runs (both worse than the run before them, range starting at that run) or
  that the same run's verdict against the release also calls slower
- improvement: the reverse of the first two, or faster beyond the noise rule
- every alert names its commit range

A new history column, loki_cold_computed, records from Loki's cache
counters whether Loki computed its cold run (true), its results cache
answered it (false) or nothing is known (null, on every older line, which
carry their own cols). bench/ab/history/ratchet.json lists rows with the
same result as Loki, status 200 and a cold run no slower than a computed
Loki cold run; the run only adds to it, rows leave by hand, and a ratcheted
row that differs or fails, or is slower than Loki's computed cold in two runs in a row, is a loss.

daily.py writes alerts.md and alerts.json next to the run's files (not
committed: they describe one run), only for the sets it just wrote. The
workflow puts them at the top of the daily pull request and in the job
summary, and a final step fails the job on a regression or a ratchet loss.
The pull request validation shows them and does not fail on them.

Co-authored-by: szibis <szibis@users.noreply.github.com>
@szibis
szibis merged commit e0c5a68 into main Oct 21, 2026
28 checks passed
@szibis
szibis deleted the ci/perf-daily-skip-unchanged branch October 21, 2026 18:00
@github-actions github-actions Bot added size/XL Extra large change and removed size/M Medium change labels Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

⚪ Performance A/B: no change beyond noise

8 shape×range — 8 ⚪ same · results vs Loki: 7 same, 0 new difference(s), 1 pre-existing

Every shape is within noise of the base build (±30% and 100 ms).

8 unchanged shape×range (within noise)
shape range base p50 PR p50 change Loki p50 PR ÷ Loki result vs Loki
⚪ drilldown service landing 1h 33 ms 30 ms ⚪ -9% 26 ms 1.15× ✅ same
⚪ instant ungrouped rate instant 10 ms 7 ms ⚪ -30% 78 ms 0.09× ✅ same
⚪ json rate by level (no filter, no drop) 1h 400 400 ⚪ +0% 400 — ✅ same
⚪ json volume no filters 1h 194 ms 201 ms ⚪ +4% 52 ms 3.87× ✅ same
⚪ logs plain 1h 45 ms 48 ms ⚪ +7% 59 ms 0.81× ✅ same
⚪ logs | json 1h 78 ms 81 ms ⚪ +4% 77 ms 1.05× ✅ same
⚪ stream-label count by app 1h 26 ms 27 ms ⚪ +4% 40 ms 0.67× ✅ same
⚪ topk rate by app 1h 44 ms 44 ms ⚪ +0% 97 ms 0.45× ➖ differs (as base)
Cold (first-run) timings — what a user opening a panel sees
shape range base cold PR cold Loki cold PR ÷ Loki cold
drilldown service landing 1h 31 ms 29 ms 897 ms 0.03×
instant ungrouped rate instant 7 ms 8 ms 80 ms 0.10×
json rate by level (no filter, no drop) 1h 400 400 400 —
json volume no filters 1h 187 ms 188 ms 1.13 s 0.17×
logs plain 1h 90 ms 45 ms 135 ms 0.33×
logs | json 1h 126 ms 142 ms 63 ms 2.25×
stream-label count by app 1h 28 ms 26 ms 769 ms 0.03×
topk rate by app 1h 44 ms 51 ms 840 ms 0.06×
Why these shapes
  • control smoke → 8: control/drilldown service landing, control/instant ungrouped rate, control/json rate by level (no filter, no drop), control/json volume no filters, control/logs plain, control/logs | json, control/stream-label count by app, control/topk rate by app

base e069c371db → PR 889bcdd5bf · 4 runs (first is cold), warm p50 · ranges 1h · noise ±30% and 100 ms · VictoriaLogs restarts 0→0 · 2.2 min. Same runner, one fresh stack, targets interleaved per request. How to read and reproduce: bench/ab/README.md.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

PR Quality Report

Compared against base branch main.

Coverage and tests

Signal Base PR Delta
Test count 11763 11826 63
Coverage 88.3% 88.3% 0.0% (stable)

Compatibility

Track Base PR Delta
Loki API 100.0% 11/11 (100.0%) 0.0% (stable)
Logs Drilldown 100.0% 17/17 (100.0%) 0.0% (stable)
VictoriaLogs 100.0% 11/11 (100.0%) 0.0% (stable)

Performance smoke

Performance smoke was skipped for this PR because no perf-sensitive paths changed.

State

  • Coverage, compatibility, and sampled performance are reported here from the same PR workflow.
  • This is a delta report, not a release gate by itself. Required checks still decide merge safety.
  • Performance smoke was intentionally skipped because no perf-sensitive paths changed in this PR.
  • Delta states use the same noise guards as the quality gate (percent + absolute + low-baseline checks), so report labels match merge-gate behavior.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Visual smoke: passed

Base e069c371db vs PR 6012e2bcd0, Grafana through the proxy builds and Loki on one fresh stack; run.
Core set: 5 capture(s) at 1h. Detailed set: 0 entries (nothing visual touched). 5 capture(s), 15m/1h/6h, 24h and 7d stay out of PR runs.

page range set base = PR (data) vs Loki (PR) pixel diff result
dd-fields 1h core ✅ identical identical (4 explained, 1 history-dependent) 0.11% ✅
dd-landing 1h core ✅ identical identical (3 explained) 0.14% ✅
dd-service-logs 1h core ✅ identical identical (3 explained, 1 history-dependent) 0.11% ✅
explore-logs-plain 1h core ✅ identical identical (1 explained) 0.07% ✅
explore-metric-plain 1h core ✅ identical identical (1 explained) 0.04% ✅

Gate: a base-vs-PR data difference passes when the PR is closer to Loki, and fails when the PR diverges from Loki or Loki cannot decide it (at a range Loki does not hold, a difference passes when the same page proved it closer to Loki at a shorter range; otherwise label the pull request visual-change-expected to accept an intended change). Also failing: a panel empty on the PR but not on the base, an error banner, panel error, error answer or new "No data" panel on the PR, a PR side that never settled, a difference that did not reproduce on the recapture. Pixel differences only warn.

Core set montages (5): base | PR | Loki

dd-fields-1h

dd-fields-1h

dd-landing-1h

dd-landing-1h

dd-service-logs-1h

dd-service-logs-1h

explore-logs-plain-1h

explore-logs-plain-1h

explore-metric-plain-1h

explore-metric-plain-1h

All montages of this run: pr-visuals/pr-796.

szibis added a commit that referenced this pull request Oct 21, 2026
The release workflow could not create the metadata branch for v2.24.1
(it was cut from #794 while main had already moved on). Materialize the
published 2.24.1 notes as the [2.24.1] section (#792's CI entry and
#794's Security entry, exactly as released) and set the chart to 2.24.1;
[Unreleased] keeps the entries merged since (#795, #796, #797).

Co-authored-by: szibis <szibis@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Maintenance scope/ci CI/CD scope/docs Documentation size/XL Extra large change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant