perf(manager-server): accelerate usage analytics with hourly rollups#327
Merged
Conversation
Introduce a shared hourly-rollup reader and migrate Dashboard plus eligible unfiltered Usage Analytics metrics to it. Preserve raw-event fallbacks for incomplete checkpoints, unsupported timezones, filters, percentiles, and high-dimensional metrics. Adds parity, DST, fallback, stability, and benchmark coverage; runtime behavior remains reversible through the existing rollup switch.
Publish bilingual documentation covering the memory investigation, dashboard and analytics optimizations, and measured 100k-event benchmark results. Document why each stage improves latency and allocations, how raw fallbacks preserve correctness, and how to disable the rollup path safely. Add the report to both operations sidebars and link it from the Manager Server guide.
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
Reuse complete hourly rollups for eligible unfiltered Usage Analytics queries while preserving raw-event fallbacks for filters, percentiles, unsupported timezones, and incomplete checkpoints.
This reduces the 100k-event rollup-owned core from 777 ms / 23.70 MB to 39 ms / 9.51 MB, and publishes a bilingual report for the July 10 performance work.
Scope
Changes
User Impact
Long-window Usage Analytics overview queries use materially less CPU time and memory when the hourly rollup is current. Filtered analytics behavior and API response semantics remain unchanged.
Compatibility / Runtime Notes
USAGE_DASHBOARD_HOURLY_ROLLUP_ENABLED=falseand restart Manager Server to force raw-event reads.Data / Security Notes
No schema change and no new sensitive-data exposure. Existing rollup tables and sanitized API behavior are unchanged.
Risk / Rollback
Risk level: Medium
Rollback notes:
USAGE_DASHBOARD_HOURLY_ROLLUP_ENABLED=falseand restart Manager Server.Verification
Commands / evidence:
Benchmark evidence:
Screenshots / Recordings
N/A — backend and documentation changes only.
Docs
Related
N/A