queries: render the queries section for synthetic runs. - #35
Open
marwen-abid wants to merge 2 commits into
Open
queries: render the queries section for synthetic runs. #35marwen-abid wants to merge 2 commits into
marwen-abid wants to merge 2 commits into
Conversation
A run can earn more than one verdict. A paced campaign that also swept queries must keep up with the block model AND meet the read-path target, and the two answer different questions about different sections. The check precedence emitted only the first, so every query cell of a paced run went unjudged. Emit every check the run earns. `checks` keeps the primary one, so readers written before this — and the published runs that predate it — see exactly what they saw. `checks_all` carries them all, primary first, each entry the shape `checks` already had. Read a verdict by matching applies_to, never by position. The 500 ms read-path target moves to docs/targets.json beside the phase goals, which the converter already loads. It was a literal in two branches of the emitter; it is a design target, so it belongs with the other design targets.
The synthetic renderer never read D.queries, so a campaign that swept queries published all its cells and showed none of them. Give it the section: a profile picker, per-op latency at the lowest concurrency, p99 and throughput across the sweep, the setup rows each leg records, and the read-path target table. The three figures are the same grid the pubnet renderer already drew, so they move to a shared helper both call rather than being written twice; the section gates off cleanly for a run without queries, as the cold and variance sections do. The target table judges a cell by its worst unit, so several units can be over inside one cell. Reporting only the worst hid that: this run has four breached cells but five profile-cells over the line. The cell now flags the others with "+N more" and the verdict carries both counts, so a hand count of a run's breaches reconciles with the table.
Contributor
|
There was a problem hiding this comment.
Pull request overview
Adds query reporting for synthetic campaign runs, including rendering, target evaluation, and multi-check metadata.
Changes:
- Adds synthetic query charts, setup tables, and target verdicts.
- Emits query checks and target metadata.
- Extends schemas, fixtures, tests, smoke coverage, and styling.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Summary | Final review note |
|---|---|---|
tests/smoke/smoke.mjs |
Validates synthetic query rendering. | No final comments. |
SCHEMA.md |
Documents multiple checks. | Nit (4 votes): update the queries annotation to include synthetic campaigns. |
docs/targets.json |
Defines the query p99 target. | No final comments. |
docs/styles.css |
Styles query subsections. | No final comments. |
docs/app.js |
Renders synthetic query data and verdicts. | Moderate (4 votes): handle profiles with incomplete query data without failing the entire report. |
converter/tests/test_phase.py |
Tests query check generation. | No final comments. |
converter/tests/fixtures.py |
Adds synthetic query fixtures. | No final comments. |
converter/convert.py |
Emits query targets and check metadata. | No final comments. |
Suppressed comments (2)
docs/app.js:1492
- A valid campaign with
query = trueandingest = coldruns only the cold query suite (the runner deliberately skips query-hot when no hot ingest exists), soqGrid.TIERScan contain onlycold. This hard-coded heading and prose still claim hot-tier results and warm-cache behavior, misleading readers of that supported run shape; make the copy conditional on the available tiers (and update the figure titles/captions likewise).
<div class="sec-head"><span class="sec-num">${secQueries}</span><h2>Queries — cold vs hot tier</h2></div>
<p class="sec-intro">The read side of the same stores the sections above filled. Every query runs through the daemon's read facade, so each one resolves its serving tier as a served request does. Cold cells drop the dataset's artifacts from the OS page cache before measuring; hot cells warm first, because a warm cache is the hot tier's steady state. Pick a profile to scope the figures.</p>
docs/app.js:689
- When a median-run cell exceeds the target but no cell has a min–max spread crossing it,
over.lengthis zero and this branch says that every cell is within budget. The synthetic renderer prepends a contradictory breach count in that case, so the legend needs to define the ▲ median breach (or branch onbreaches).
foot.textContent = over.length
? "✓ = median-run p99 within the budget for every unit. † = passes at the median but at least one run exceeded it: " + over.join("; ") + "."
: "✓ = median-run p99 within the budget for every unit, including each cell's min–max spread.";
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+101
to
+105
| "checks_all": [ … ], // EVERY check the run earns, primary first | ||
| // A run can earn more than one: a paced campaign that also swept queries | ||
| // is judged both on keeping up with the block model (applies_to | ||
| // "ingest_hot") and on the read-path target (applies_to "queries"), and | ||
| // the two answer different questions about different sections. Each entry |
| function queryFigs(o) { | ||
| const { Q, QT, CONC, TIERS, C, ids } = o; | ||
| const tierColor = t => (t === "cold" ? C.cold : C.hot); | ||
| const cell = (tier, qt, cc) => Q[tier][o.unit()][qt][cc]; |
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.
No description provided.