Skip to content

Stats Review: Add MockStatsService and StatsDataAggregator (P5) - #24717

Closed
kean wants to merge 1 commit into
review/date-range-typesfrom
review/mock-service
Closed

Stats Review: Add MockStatsService and StatsDataAggregator (P5)#24717
kean wants to merge 1 commit into
review/date-range-typesfrom
review/mock-service

Conversation

@kean

@kean kean commented Aug 5, 2025

Copy link
Copy Markdown
Contributor
  • Add MockStatsService that uses mock data introduced in Stats Review: Add Resources (P1) #24713
  • Add StatsDataAggregatorused by the service. It takes the list of data points (hourly or otherwise) and aggregates them with the given date period and granularity. So, for example, it can aggregated them by years. StatsDataAggregator is used by other types coming in the future PRs, which is why it's covered with unit tests.

Note: MockStatsService is a debug-only class, which is why I spent the minimum amount of time on it. It has performance issues and could be refactored. I deemed it not worth the effort.

@kean kean added this to the Pending milestone Aug 5, 2025
@kean kean added the Stats label Aug 5, 2025
@kean kean mentioned this pull request Aug 5, 2025
14 tasks
@dangermattic

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2025

Copy link
Copy Markdown

@kean kean closed this Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants