Name the alert's grid point and read boundaries off the base tables - #1017
Draft
epompeii wants to merge 1 commit into
Draft
Name the alert's grid point and read boundaries off the base tables#1017epompeii wants to merge 1 commit into
epompeii wants to merge 1 commit into
Conversation
epompeii
force-pushed
the
u/ep/parameters-api/alerts
branch
from
August 26, 2026 08:14
9bba446 to
5459312
Compare
Contributor
|
| Project | Bencher |
| Branch | u/ep/parameters-api/alerts |
| Testbed | intel-v1 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result microseconds (µs) (Result Δ%) | Upper Boundary microseconds (µs) (Limit %) |
|---|---|---|---|
| Adapter::Json | 📈 view plot 🚷 view threshold | 5.26 µs(+10.48%)Baseline: 4.76 µs | 5.56 µs (94.55%) |
| Adapter::Magic (JSON) | 📈 view plot 🚷 view threshold | 5.08 µs(+9.94%)Baseline: 4.62 µs | 5.34 µs (95.06%) |
| Adapter::Magic (Rust) | 📈 view plot 🚷 view threshold | 27.89 µs(+6.94%)Baseline: 26.08 µs | 28.42 µs (98.16%) |
| Adapter::Rust | 📈 view plot 🚷 view threshold | 4.66 µs(+26.26%)Baseline: 3.69 µs | 5.31 µs (87.71%) |
| Adapter::RustBench | 📈 view plot 🚷 view threshold | 4.66 µs(+26.46%)Baseline: 3.68 µs | 5.29 µs (88.15%) |
epompeii
force-pushed
the
u/ep/parameters-api/alerts
branch
from
August 26, 2026 09:10
5459312 to
e79420c
Compare
epompeii
force-pushed
the
u/ep/parameters-api/alerts
branch
from
August 27, 2026 03:46
e79420c to
96aae30
Compare
An alert said which benchmark and which measure it fired on, and a benchmark now has grid points, so two grid points of one benchmark under one threshold raised two alerts that read identically. `JsonAlert` gains `parameter`, the grid point the alert fired on, between the benchmark and the metric, because that is the order the dimensions run in. Every surface that returns an alert carries it: the alerts list, the alert detail, and the alerts a report response embeds. The perf response's slim alert reference is unchanged; the line it hangs off already names its grid point. Both alert readers move off the `metric_boundary` view and onto the base tables. An alert names its boundary, the boundary names its metric row, and that row names the report it landed in and the grid point it was measured under, so each hop is an identifier seek off the hop before it. The metric triple comes from the `value` row the boundary was computed for plus its `lower_value` and `upper_value` siblings, the same assembly the metric endpoint does, now shared rather than written twice. The move is what a later layer needs. The view carries at most one boundary per metric row, and a metric row is about to be allowed several, so a reader that reached its boundary through the view would fan out one alert into one per boundary. No reader joins a boundary through the view any more. Every field an alert carried before carries exactly what it carried before, `metric` included: it is still required, and it is still the triple built around the row the boundary was computed for. The alert responses are pinned against that shape by fixture, key set and values both. The view itself stays, and the migration that holds its column list unchanged stays pinned to it. Its Rust model goes, because nothing reads it now, and the migration test reads the view directly rather than through an endpoint that no longer does.
epompeii
force-pushed
the
u/ep/parameters-api/alerts
branch
from
August 27, 2026 05:11
96aae30 to
46545ce
Compare
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.
The field
JsonAlertgainsparameter, the grid point the alert fired on. It sits betweenbenchmarkandmetric, because that is the order the dimensions run in: branch, testbed, benchmark, parameters, measure, metric.Two grid points of one benchmark under one threshold used to raise two alerts that read identically: same benchmark, same measure, same threshold, nothing to tell them apart. Now the alert names its grid point.
Every surface that returns an alert carries it:
GET /v0/projects/{project}/alertsGET /v0/projects/{project}/alerts/{alert}, and itsPATCHresponseThe perf response's
JsonPerfAlertis unchanged. It is a slim reference, and the line it hangs off already names its grid point.The reader moves
Both alert readers move off the
metric_boundaryview and onto the base tables. An alert names its boundary, the boundary names its metric row, and that row names the report it landed in and the grid point it was measured under, so each hop is an identifier seek off the hop before it.The metric triple is assembled from the
valuerow the boundary was computed for plus itslower_valueandupper_valuesiblings, which is the same assembly the metric endpoint does. That assembly is now shared rather than written twice.The move is what the next layer needs. The view carries at most one boundary per metric row, and a metric row is about to be allowed several, so a reader that reached its boundary through the view's left join would fan one alert out into one per boundary.
No reader joins a boundary through the view
One match, in
services/console/src/chunks/engineering/sqlite-performance-tuning/bonus-bug-rust-left-join.mdx: a code sample quoted in a blog post, not a query. There is no other reference anywhere in the tree.The view itself stays, and the migration that holds its column list unchanged stays pinned to it. Its Rust model is gone, because nothing reads it now.
Compatibility
Every field an alert carried before carries exactly what it carried before.
metricincluded: it is still required, and it is still the triple built around the row the boundary was computed for.The claim is stated as a fixture rather than asserted. A two grid point history under one threshold is pinned key set and values both, against what the previous shape gave that same fixture: the key set is the old one plus
parameter, and every old key holds its old value. Three more fixtures pin the triple for a metric row with both bounds, one bound, and no bounds. The report response's embedded alerts and the alerts endpoint's alerts are pinned equal for the same report.cargo gen-typesregenerates the OpenAPI spec and the TypeScript types.