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

Move scheduling of metrics periodic updater so it is run in MP as well as in SE (3.x) #3733

Merged
merged 1 commit into from
Dec 14, 2021
Merged

Move scheduling of metrics periodic updater so it is run in MP as well as in SE (3.x) #3733

merged 1 commit into from
Dec 14, 2021

Conversation

tjquinno
Copy link
Member

Resolves #3731

For performance reasons, metrics uses a periodic executor to recalculate the current time in minutes, rather doing so on every update to a time-based metric (e.g., timer, meter). Servers under light load can spare the cycles, while this spares servers under heavy load from repeating the calculation and getting the same result on each update.

This works correctly in SE, but in MP the MetricsSupport class is initialized slightly differently and the start-up of the PeriodicExecutor was incorrectly skipped.

This PR moves that start-up invocation so that it runs in both SE and MP.

Signed-off-by: tim.quinn@oracle.com tim.quinn@oracle.com

…ot just SE

Signed-off-by: tim.quinn@oracle.com <tim.quinn@oracle.com>
@tjquinno tjquinno merged commit a4ea6dc into helidon-io:master Dec 14, 2021
@tjquinno tjquinno deleted the mp-metrics-clock-fix-3.x branch December 14, 2021 15:20
arjav-desai pushed a commit to arjav-desai/helidon that referenced this pull request Dec 17, 2021
…ot just SE (helidon-io#3733)

Signed-off-by: tim.quinn@oracle.com <tim.quinn@oracle.com>
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.

MP metrics does not correctly rescale distributions (e.g., timers, histograms)
2 participants