Move scheduling of metrics periodic updater so it is run in MP as well as in SE (3.x) #3733
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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