Repository navigation
Experiment results: the trailing week as hourly rate lines - #12
Merged
Merged
Conversation
The read the pre-aggregated schema was shaped for: a week of hourly cells is a range scan of the primary key, the same size whether the experiment saw ten requests or ten million. The results response gains a `series` field — hours nobody recorded are absent, not zero, because "no traffic" and "0 % converting" are different facts — and the dashboard draws them as one line per arm, colour-keyed like the meters, breaking at gaps, with an invisible hover target per hour instead of 168 dots of ink. The seeded counters now follow a daily cosine cycle with uncorrelated jitter per arm, so the chart shows a plausible week rather than the sawtooth the old modular wobble produced. Co-Authored-By: Claude Fable 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.
The counters table stores hourly cells; this makes them visible.
GET .../resultsgains aseriesfield — the trailing week of per-arm hourly tallies, absent where nobody recorded (no traffic is a gap, not a 0 % rate) — and the dashboard draws one conversion-rate line per arm above the results table, colour-keyed like the meters below, breaking at gaps, with an invisible per-hour hover target carrying the exact numbers.The window is a week because the totals already cover all time; the query is a range scan of the primary key, the same size at any traffic level. The seed now shapes its counters like traffic — a daily cosine cycle with uncorrelated per-arm jitter — so the chart demos a plausible week instead of a sawtooth.
Verified in a real browser: lines, gaps, tooltips, and zero WCAG A/AA violations in light and dark. The integration suite gains a test pinning hour bucketing, same-hour merging, the window cutoff, and oldest-first ordering.
🤖 Generated with Claude Code