Skip to content

Pin the parameters filter on a plot - #1021

Draft
epompeii wants to merge 1 commit into
u/ep/parameters-api/thresholds-payloadfrom
u/ep/parameters-api/plot-parameters
Draft

epompeii wants to merge 1 commit into
u/ep/parameters-api/thresholds-payloadfrom
u/ep/parameters-api/plot-parameters

Conversation

@epompeii

@epompeii epompeii commented Aug 26, 2026

Copy link
Copy Markdown
Member

A pinned plot stores what the perf URL stores.

The other dimensions of a plot are entity references, so they live in join tables of UUIDs. The parameters dimension in query space is not a reference: it is a value predicate, a filter, so the plot stores the same canonical list of entries the perf query takes.

A UUID join table was considered and rejected. A pinned variant's full parameters used as a filter also match future supersets of themselves, so UUID pinning cannot faithfully drive the ruled query, and a filter column round-trips "pin the current perf view" exactly.

The field

The plot table gains a nullable parameters column: the SQLite JSONB encoding of a JSON array of partial parameters, the same encoding the threshold column uses. JsonPlot, JsonNewPlot, and the plot patch shape gain parameters after benchmarks and before measures, the canonical dimension order.

NULL is match all, so every plot that predates this migration carries NULL and draws exactly what it drew before. A plot with no filter answers with the field absent, and the migration is a plain ADD COLUMN.

Canonical semantics

The filter means exactly what the perf query's parameters param means: OR across the list, subset match within each entry. A variant matches when any entry of the list is a subset of its parameters, so a filter names only the keys it cares about and a variant that pins more keys still matches.

Canonicalization is ParameterFilter's own, unchanged and unduplicated: each entry in its RFC 8785 canonical form, the list sorted by canonical bytes and deduplicated, at most eight entries. A list holding the empty entry and the empty list are both match all, and so is an absent field, so all three are one stored state: no filter at all.

On a patch, an absent parameters leaves the plot's filter alone. An explicit null and an empty list both clear it back to every variant, which are two spellings of one filter and so land on one stored value.

The console will pass the filter through when it builds the perf query. No console change here.

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

馃惏 Bencher Report

ProjectBencher
Branchu/ep/parameters-api/plot-parameters
Testbedintel-v1
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
microseconds (碌s)
(Result 螖%)
Upper Boundary
microseconds (碌s)
(Limit %)
Adapter::Json馃搱 view plot
馃毞 view threshold
5.18 碌s
(+6.57%)Baseline: 4.86 碌s
5.90 碌s
(87.76%)
Adapter::Magic (JSON)馃搱 view plot
馃毞 view threshold
4.96 碌s
(+5.30%)Baseline: 4.71 碌s
5.60 碌s
(88.42%)
Adapter::Magic (Rust)馃搱 view plot
馃毞 view threshold
27.39 碌s
(+3.54%)Baseline: 26.45 碌s
29.96 碌s
(91.40%)
Adapter::Rust馃搱 view plot
馃毞 view threshold
4.70 碌s
(+20.29%)Baseline: 3.91 碌s
6.09 碌s
(77.16%)
Adapter::RustBench馃搱 view plot
馃毞 view threshold
4.67 碌s
(+19.52%)Baseline: 3.90 碌s
6.07 碌s
(76.83%)
馃惏 View full continuous benchmarking report in Bencher

@epompeii
epompeii force-pushed the u/ep/parameters-api/plot-parameters branch 2 times, most recently from 284e133 to 9d4a326 Compare August 27, 2026 04:22
@epompeii
epompeii force-pushed the u/ep/parameters-api/plot-parameters branch from 9d4a326 to cf8ffa3 Compare August 27, 2026 05:11
@epompeii
epompeii force-pushed the u/ep/parameters-api/plot-parameters branch from cf8ffa3 to 2875eb1 Compare September 17, 2026 04:48
@epompeii

Copy link
Copy Markdown
Member Author

Review after the rebase onto devel

Rebased onto devel with no source conflicts. Two independent reviews and an adjudication found no major defect introduced by the rebase.

Cleanup applied from review: the plot_parameters migration now recreates the table so parameters sits after window, rather than ADD COLUMN placing it after modified. schema.rs, QueryPlot, and InsertPlot follow the same order.

Follow-up: a pinned plot's filter never reaches the console

A plot's parameters filter is stored and returned, but PinnedFrame.tsx builds the perf query from branches, testbeds, benchmarks, and measures only, so a plot pinned with a filter through the API or bencher plot create/update draws every variant in the console. specs is missing from the same query already. This is console work for the layer that renders variants: pass the plot's parameters into the pinned frame's perf query.

@epompeii
epompeii force-pushed the u/ep/parameters-api/plot-parameters branch from 2875eb1 to 69ffb8b Compare September 18, 2026 06:06
@epompeii
epompeii force-pushed the u/ep/parameters-api/plot-parameters branch from 69ffb8b to 1034559 Compare September 18, 2026 06:10
@epompeii
epompeii force-pushed the u/ep/parameters-api/plot-parameters branch 3 times, most recently from b6eebe4 to 26000cd Compare September 19, 2026 06:18
A pinned plot stores what the perf URL stores. The `plot` table gains a
nullable `parameters` column holding the canonical filter list, the same
JSONB encoding the threshold column uses, and `JsonPlot`, `JsonNewPlot`,
and the plot patch shape gain the field in the canonical dimension order,
after `benchmarks` and before `measures`.

NULL is match all, so every plot that predates this carries NULL and
draws exactly what it drew before.
@epompeii
epompeii force-pushed the u/ep/parameters-api/plot-parameters branch from 26000cd to 953768a Compare September 19, 2026 06:27
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