use of com.hazelcast.test.metrics.MetricsRule in project hazelcast by hazelcast.
the class TestHazelcastInstanceFactory method registerTestMetricsPublisher.
private void registerTestMetricsPublisher(HazelcastInstance hazelcastInstance) {
if (metricsRule != null && metricsRule.isEnabled()) {
MetricsService metricService = getNodeEngineImpl(hazelcastInstance).getService(MetricsService.SERVICE_NAME);
metricService.registerPublisher((FunctionEx<NodeEngine, MetricsPublisher>) nodeEngine -> metricsRule.getMetricsPublisher(hazelcastInstance));
}
}
Aggregations