Rename the metric triple and the parameter set field - #1009
Merged
Conversation
Three renames and the migration one of them needs. No behavior change. `JsonMetric` becomes `JsonMetricTriple`: the type is the value with its two bounds, and the plain name kept reading like the whole of what a metric is. Every serde field that carries one keeps its own name, so no response byte moves. `JsonReportParameter.parameters` becomes `set`. The object is already named `parameter` where a report result carries it, so the field spells what it holds rather than repeating its parent. `JsonParameters` becomes `ParameterSet`, which is what the type has been called in prose since it was written. The `parameter.parameters` column follows the field to `parameter.set`. `set` is an SQL keyword, so the migration and the raw SQL that reads the column quote it; Diesel quotes identifiers of its own accord. The migration is a metadata only `ALTER TABLE ... RENAME COLUMN`: SQLite rewrites the stored DDL, `UNIQUE(benchmark_id, "set")` included, without reading a row.
Contributor
|
| Project | Bencher |
| Branch | rename/metric-triple-parameter-set |
| Testbed | intel-v1 |
🚨 4 Alerts
| Benchmark | Measure Units | View | Benchmark Result (Result Δ%) | Upper Boundary (Limit %) |
|---|---|---|---|---|
| Adapter::Json | Latency microseconds (µs) | 📈 plot 🚷 threshold 🚨 alert (🔔) | 5.21 µs(+10.72%)Baseline: 4.70 µs | 5.18 µs (100.48%) |
| Adapter::Magic (JSON) | Latency microseconds (µs) | 📈 plot 🚷 threshold 🚨 alert (🔔) | 5.03 µs(+10.20%)Baseline: 4.56 µs | 4.99 µs (100.88%) |
| Adapter::Rust | Latency microseconds (µs) | 📈 plot 🚷 threshold 🚨 alert (🔔) | 4.64 µs(+30.33%)Baseline: 3.56 µs | 4.45 µs (104.27%) |
| Adapter::RustBench | Latency microseconds (µs) | 📈 plot 🚷 threshold 🚨 alert (🔔) | 4.65 µs(+30.57%)Baseline: 3.56 µs | 4.45 µs (104.53%) |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result microseconds (µs) (Result Δ%) | Upper Boundary microseconds (µs) (Limit %) |
|---|---|---|---|
| Adapter::Json | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 5.21 µs(+10.72%)Baseline: 4.70 µs | 5.18 µs (100.48%) |
| Adapter::Magic (JSON) | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 5.03 µs(+10.20%)Baseline: 4.56 µs | 4.99 µs (100.88%) |
| Adapter::Magic (Rust) | 📈 view plot 🚷 view threshold | 26.99 µs(+4.22%)Baseline: 25.90 µs | 27.39 µs (98.56%) |
| Adapter::Rust | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 4.64 µs(+30.33%)Baseline: 3.56 µs | 4.45 µs (104.27%) |
| Adapter::RustBench | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 4.65 µs(+30.57%)Baseline: 3.56 µs | 4.45 µs (104.53%) |
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 renames
Three renames and the migration one of them needs. No behavior change.
JsonMetric->JsonMetricTripleA
JsonMetricis a value with its two bounds: the triple a metric row used to bebefore named values existed. The plain name read like the whole of what a metric is,
which it is not any more. This is a type rename only. Every serde field that carries
one keeps its own name (
JsonAlert.metric,JsonPerfMetric.metric, and the rest), sonot one response byte changes. The OpenAPI component and the TypeScript type follow.
JsonReportParameter.parameters->setThe object is already named
parameterwhere a report result carries it, so the fieldspelled its parent again. It now spells what it holds:
This one does change report response bytes. It is free right now: no released CLI
deserializes the report
parameterobject, so nothing in the wild reads the oldspelling. Once the next release ships a client that does, the same rename becomes a
break. The type name
JsonReportParameteris unchanged.The BMF v1 input format is untouched. A report still submits
"parameters"on eachentry, and every adapter fixture stays as it was.
JsonParameters->ParameterSetThe type has been called a parameter set in its own prose since it was written. It is
an internal newtype with a hand written
JsonSchemaimpl, so the component name isrenamed there as well, and the typeshare mapping follows.
The migration
2026-08-23-120000_parameter_setrenames theparameter.parameterscolumn toparameter.set, and the model fields follow it (QueryParameter.set,InsertParameter.set,UpdateParameter.set).setis an SQL keyword, so the migration and the raw SQL that reads the column quoteit. Diesel quotes identifiers of its own accord, so the DSL needs nothing.
The migration is metadata only:
SQLite rewrites the stored DDL in place,
UNIQUE(benchmark_id, "set")and the indexthat backs it included, without reading a row.
down.sqlis the reverse, and just ascheap.
Migrations already written keep the spelling that was true when they ran: the
migrations that create and read
parameter.parametersare history and are left alone.The one seed in the migration tests that hand writes a
parameterrow below thislayer now does so in raw SQL under the old column name, which is what the schema at
that point in the chain has; the chain renames it on the way back up.
Gates
cargo fmt -- --checkcargo clippy --no-deps --all-targets --all-features -- -Dwarningscargo nextest run --all-features --profile ci,cargo test --doc --all-featurescargo check --no-default-featurescargo gen-types, with the regenerated spec and TypeScript types committed