test(stats): add page-miss benches for the dashboard and the query log - #278
Merged
Merged
Conversation
The Statistics page had a page-miss bench; the two other readers of query_logs did not, so a change aimed at them had no before/after to show. - dashboard_page_miss_bench reports the first response and the event stream tick (compute_snapshot), which recurs every 10 seconds. - logs_page_miss_bench reports the list (page 1 and page 20) and the count for every filter the query log offers, alone and combined, with the busiest and quietest value of each drawn from BENCH_DB, plus the domain suggestions the page renders. - All three benches take BENCH_NOW, so a database copy older than its windows still measures the traffic it holds. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #278 +/- ##
=======================================
Coverage 91.14% 91.14%
=======================================
Files 31 31
Lines 11401 11401
=======================================
Hits 10392 10392
Misses 1009 1009 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
The Statistics page has
stats_page_miss_bench; the dashboard and the query log, the other two readers ofquery_logs, had nothing equivalent, so a change aimed at them had no before/after to show. This adds both, as#[ignore]benches in the same shape.dashboard_page_miss_benchreports the first response (dashboard_page) and the event-stream tick (compute_snapshot), which recurs everyTICK_INTERVAL_SECSwhile a dashboard is open.logs_page_miss_benchreports the list (page 1 and page 20) and the count for every filter/logsoffers, alone and combined, with the busiest and the quietest value of each drawn fromBENCH_DBitself, plus the domain suggestions the page renders.BENCH_NOW(unix seconds) on all three benches pins the clock, so a copy older than its windows still measures the traffic it holds.No behaviour change: only
#[ignore]benches and the docs that list them (ARCHITECTURE.md,CLAUDE.md).Baseline at 46e1410
Real database, 370 677 rows (8 days)
Synthetic database, 1 482 708 rows (31 days, the real week replayed four times)
Test plan
cargo fmt --checkcargo clippy --all-targets -- -D warningscargo nextest run: 680 passed, 8 skipped🤖 Generated with Claude Code