-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Optimize metrics aggregate/persistent worker: seperate OAL and MAL workers and consume pools, and make the consumer thread sleep when no data in.
#13414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…` workers and consume pools, and make the consumer thread sleep when no data in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR optimizes the metrics aggregation and persistence processing by separating OAL (Observability Analysis Language) and MAL (Meter Analysis Language) workers into dedicated thread pools with different configurations. The key optimization introduces a notification-based consumption pattern for MAL workers to reduce unnecessary resource usage when no data is available.
- Separates OAL and MAL workers into dedicated worker classes with optimized configurations
- Introduces notification-based consumer thread sleeping for MAL workers to reduce CPU usage
- Updates the data carrier consumer pool to support notifiable consumption patterns
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| ConsumerPoolFactoryTest.java | Updates test to include new notifiable parameter in BulkConsumePool.Creator |
| MultipleChannelsConsumer.java | Adds notification-based consumption logic with sleep when no data |
| BulkConsumePool.java | Adds notifiable parameter and consumer notification capability |
| MetricsStreamProcessor.java | Implements factory pattern to create OAL/MAL specific workers |
| MetricsPersistentMinWorker.java | Converts to abstract base class with configurable pool parameters |
| MetricsPersistentMinOALWorker.java | OAL-specific persistent worker with optimized settings |
| MetricsPersistentMinMALWorker.java | MAL-specific persistent worker with notification support |
| MetricsAggregateWorker.java | Converts to abstract base class with configurable pool parameters |
| MetricsAggregateOALWorker.java | OAL-specific aggregate worker with high-throughput settings |
| MetricsAggregateMALWorker.java | MAL-specific aggregate worker with notification support |
| changes.md | Documents the optimization changes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
CHANGESlog.Optimize metrics aggregate/persistent worker: seperate OAL and MAL workers and consume pools, and make the consumer thread sleep when no data in.