shodaaan commented on code in PR #2216:
URL: https://github.com/apache/jackrabbit-oak/pull/2216#discussion_r2057753981
##########
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/run/cli/NodeStoreFixtureProvider.java:
##########
@@ -100,15 +100,19 @@ private static boolean oldSegmentStore(Options options) {
return !manifest.exists();
}
- private static StatisticsProvider createStatsProvider(Options options,
Whiteboard wb, Closer closer) {
+ public static StatisticsProvider createStatsProvider(Whiteboard wb, Closer
closer) {
+ ScheduledExecutorService executorService =
+ MoreExecutors.getExitingScheduledExecutorService(new
ScheduledThreadPoolExecutor(1));
+ MetricStatisticsProvider statsProvider = new
MetricStatisticsProvider(getPlatformMBeanServer(), executorService);
+ closer.register(statsProvider);
+ closer.register(() -> reportMetrics(statsProvider));
+ wb.register(MetricRegistry.class, statsProvider.getRegistry(),
emptyMap());
+ return statsProvider;
+ }
+
+ public static StatisticsProvider createStatsProvider(Options options,
Whiteboard wb, Closer closer) {
Review Comment:
Done, thank you for the suggestion.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]