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 (2.x) #3732

Merged
merged 1 commit into from Dec 14, 2021
Merged

Conversation

tjquinno
Copy link
Member

@tjquinno tjquinno commented Dec 13, 2021

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 added the 2.x Issues for 2.x version branch label Dec 13, 2021
@tjquinno tjquinno added this to the 2.4.1 milestone Dec 13, 2021
@tjquinno tjquinno self-assigned this Dec 13, 2021
@tjquinno tjquinno changed the title Move scheduling of periodic updater so it is run in MP as well as in SE (2.x) Move scheduling of metrics periodic updater so it is run in MP as well as in SE (2.x) Dec 13, 2021
@tjquinno tjquinno merged commit 64676ad into helidon-io:helidon-2.x Dec 14, 2021
@tjquinno tjquinno deleted the mp-metrics-clock-fix branch December 14, 2021 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issues for 2.x version branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants