Skip to content
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

Expose current task statuses count to Prometheus #640

Merged
merged 4 commits into from
Dec 8, 2023

Conversation

mcornaton
Copy link
Contributor

No description provided.

@mcornaton mcornaton marked this pull request as ready for review December 7, 2023 15:30
void init() {
// The following could take a bit of time, depending on how many tasks are in DB.
// It is expected to take ~1s for 100,000 tasks and to be linear (so, ~10s for 1,000,000 tasks).
currentTaskStatusesCount.forEach((status, count) -> count.set(taskService.countByCurrentStatus(status)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be a good place to try to use a parallel stream in this case ?

Copy link

sonarqubecloud bot commented Dec 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

92.3% 92.3% Coverage
0.0% 0.0% Duplication

@mcornaton mcornaton merged commit 5012256 into develop Dec 8, 2023
@mcornaton mcornaton deleted the feature/expose-task-statuses-count-to-prometheus branch December 8, 2023 11:22
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.

3 participants