Skip to content

Add metrics for LogicLooper - #41

Merged
mayuki merged 7 commits into
masterfrom
feature/Metrics
Aug 14, 2025
Merged

Add metrics for LogicLooper#41
mayuki merged 7 commits into
masterfrom
feature/Metrics

Conversation

@mayuki

@mayuki mayuki commented Aug 14, 2025

Copy link
Copy Markdown
Member

No description provided.

mayuki and others added 7 commits August 13, 2025 16:59
- Introduced `LogicLooperMetrics` class for tracking metrics related to logic loopers, including shared pool loopers and processing duration.
- Added a singleton `LogicLooperTracker` to manage active loopers and their lifecycle.
- Modified `NotInitializedLogicLooperPool` to return an empty array for the `Loopers` property.
- Updated `LogicLooper` to register/unregister with `LogicLooperTracker` and enhanced its `Dispose` method for proper cleanup.
- Added unit tests for `LogicLooperMetrics` and `LogicLooperTracker` to ensure functionality.
- Updated project files to include necessary package references for metrics and testing.
This commit introduces the "LogicLooper.Diagnostics" project, which includes a new project file with necessary properties and dependencies. It adds the `LogicLooperDiagnosticsExtensions` class for integrating metrics services into an `IServiceCollection`, along with the `LogicLooperMetricsInitializationHostedService` for metrics initialization.

The `LogicLooperMetrics` class is enhanced with new metrics for running actions and processing durations, including histograms for average, minimum, and maximum durations. A new internal `PointBuffer` class is introduced for managing metrics data buffering. Additionally, the `LogicLooperTracker` class is updated to track approximately running actions, improving overall tracking capabilities.
@mayuki
mayuki merged commit 23033e8 into master Aug 14, 2025
3 checks passed
@mayuki
mayuki deleted the feature/Metrics branch August 14, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant