ci: add a perf-movements reader for the benchmark pipelines - #38806
Draft
antiguru wants to merge 1 commit into
Draft
ci: add a perf-movements reader for the benchmark pipelines#38806antiguru wants to merge 1 commit into
antiguru wants to merge 1 commit into
Conversation
Answering "what moved in performance" across the nightly, release-qualification and spec-sheet pipelines currently means opening a dozen job logs by hand and reading fixed-width tables. This adds a reader that collects those numbers and ranks them. The pipelines publish two different kinds of evidence, and the reader keeps them apart. The feature benchmark, parallel benchmark and scalability benchmark each run both sides themselves against the merge base or a named ancestor and print a comparison table, so the movement is already computed in CI against a same-hardware baseline and only has to be recovered. The cluster spec sheet measures one build in isolation and uploads raw per-repetition CSV rows, so its baseline is reconstructed here as the median of preceding builds, which carries cross-run noise the self-comparing steps do not have. Direction is resolved per metric rather than taken from the sign of the change, because a parallel-benchmark qps rising is good while an avg rising is bad and both print as a positive number. The caller's --threshold is the only floor applied: a step's own threshold is a build gate set well above the noise floor, and deferring to it would hide every movement CI tolerates, including the confirmation that an optimization landed. Fetching reuses the existing buildkite_insights API, cache and builds layers, so a repeated run over the same window costs one fetch for the newest build. Where no Buildkite token is configured, --from-log and --from-csv parse files fetched by other means through the same code, and job logs are accepted both as plain text and in the JSON form the Buildkite MCP server saves. Steps that publish neither a per-metric comparison nor per-repetition rows (limits, bounded-memory, upgrade downtime, cargo-bench) are excluded rather than approximated, and the skill says so instead of substituting a number. Tests cover the three log parsers, the CSV schemas and the ranking, with fixtures copied verbatim from nightly build 18282 and spec-sheet build 46. The parsers depend on print statements elsewhere in the repo and go quiet rather than loud when those change, so the fixtures are what makes such a change visible. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Answering "what moved in performance" across the nightly, release-qualification and spec-sheet pipelines currently means opening a dozen job logs by hand and reading fixed-width tables. This adds
mz-perf-movements, a skill plus a reader undermisc/python/materialize/buildkite_insights/perf_movements/, that collects those numbers and ranks regressions and improvements together.The pipelines publish two different kinds of evidence, and the reader keeps them apart. The feature benchmark, parallel benchmark and scalability benchmark each run both sides themselves against the merge base or a named ancestor and print a comparison table, so the movement is already computed in CI against a same-hardware baseline and only has to be recovered. The cluster spec sheet measures one build in isolation and uploads raw per-repetition CSV rows, so its baseline is reconstructed here as the median of preceding builds, which carries cross-run noise the self-comparing steps do not have. The skill says as much, so a spec-sheet movement is not read as equal evidence to a feature-benchmark movement of the same size.
Two decisions worth flagging for review. Direction is resolved per metric rather than taken from the sign of the change, because a parallel-benchmark
qpsrising is good while anavgrising is bad and both print as a positive number. And the caller's--thresholdis the only floor applied: a step's own threshold is a build gate set well above the noise floor, so deferring to it would hide every movement CI tolerates, including the confirmation that an optimization landed.Fetching reuses the existing
buildkite_insightsAPI, cache and builds layers, so a repeated run over the same window costs one fetch for the newest build. Where no Buildkite token is configured,--from-logand--from-csvparse files fetched by other means through the same code, and job logs are accepted both as plain text and in the JSON form the Buildkite MCP server saves.Steps that publish neither a per-metric comparison nor per-repetition rows are excluded rather than approximated:
limits,limits-instance-size,bounded-memory,bounded-memory-search,orchestratord-rolling-upgrade-downtime,cargo-bench, and the spec sheet's.cluster_object_limits.csv, whose headline number is a maximum healthy object count rather than a median. Richer history lives in thetest_analyticsdatabase, which needs a separate credential; the skill points at it without depending on it.Tests added in
perf_movements_test.pycover the three log parsers, both spec-sheet CSV schemas, the CRLF line endings Buildkite actually serves, and the ranking and threshold behaviour. The fixtures are copied verbatim from nightly build 18282 and spec-sheet build 46, because the parsers depend on print statements elsewhere in the repo and go quiet rather than loud when those change.Draft, because one path is still unexercised: the reader's own Buildkite fetching in
collect.pyhas been read but not run, for want of a token in the development environment. Everything downstream of the fetch is verified against real build data through the offline flags. I will confirm the fetch path and undraft.No release note, this is CI tooling with no user-visible surface.
🤖 Generated with Claude Code