Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #68 +/- ##
=======================================
Coverage 89.84% 89.84%
=======================================
Files 10 10
Lines 1438 1438
=======================================
Hits 1292 1292
Misses 146 146 ☔ View full report in Codecov by Sentry. 🚀 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.
This pull request refactors the analytics snapshot API to serve pre-computed aggregates instead of calculating metrics on each request. The main changes include updating the API route and GCS utility functions to fetch a new
analytics_aggregate.jsonfile, removing server-side metric computation, and cleaning up unused types. This will improve performance and simplify the analytics service.API and Data Flow Refactor:
/api/snapshotroute (route.ts) now returns the pre-computed analytics aggregate from GCS, removing all on-the-fly metric calculations and enrichment.gcs.ts) replacesgetLatestSnapshotwithgetAnalyticsAggregate, fetching the newanalytics_aggregate.jsonfile. All snapshot history and bucket-checking functions are removed as they're no longer needed.Workflow and Data Generation:
collect-coder-analytics.yml) adds a step to run the analytics aggregation script after data collection, ensuring the aggregate is always up to date.Codebase Cleanup:
types.ts, reflecting the switch to the new aggregate format.AnalyticsSnapshottype.