use of com.hazelcast.internal.metrics.impl.MetricsRegistryImpl in project hazelcast by hazelcast.
the class HazelcastClientInstanceImpl method initMetricsRegistry.
private MetricsRegistryImpl initMetricsRegistry() {
ProbeLevel probeLevel = properties.getEnum(Diagnostics.METRICS_LEVEL, ProbeLevel.class);
ILogger logger = loggingService.getLogger(MetricsRegistryImpl.class);
MetricsRegistryImpl metricsRegistry = new MetricsRegistryImpl(logger, probeLevel);
RuntimeMetricSet.register(metricsRegistry);
GarbageCollectionMetricSet.register(metricsRegistry);
OperatingSystemMetricSet.register(metricsRegistry);
ThreadMetricSet.register(metricsRegistry);
ClassLoadingMetricSet.register(metricsRegistry);
FileMetricSet.register(metricsRegistry);
return metricsRegistry;
}
use of com.hazelcast.internal.metrics.impl.MetricsRegistryImpl in project hazelcast by hazelcast.
the class OperatingSystemMetricSetTest method setup.
@Before
public void setup() {
metricsRegistry = new MetricsRegistryImpl(Logger.getLogger(MetricsRegistryImpl.class), INFO);
OperatingSystemMetricSet.register(metricsRegistry);
}
use of com.hazelcast.internal.metrics.impl.MetricsRegistryImpl in project hazelcast by hazelcast.
the class OperatingSystemMetricSetTest method registerMethod_whenNotExist.
@Test
public void registerMethod_whenNotExist() {
metricsRegistry = new MetricsRegistryImpl(Logger.getLogger(MetricsRegistryImpl.class), INFO);
FakeOperatingSystemBean fakeOperatingSystemBean = new FakeOperatingSystemBean();
registerMethod(metricsRegistry, fakeOperatingSystemBean, "notexist", "notexist");
boolean parameterExist = metricsRegistry.getNames().contains("notexist");
assertFalse(parameterExist);
}
use of com.hazelcast.internal.metrics.impl.MetricsRegistryImpl in project hazelcast by hazelcast.
the class GarbageCollectionMetricSetTest method setup.
@Before
public void setup() {
metricsRegistry = new MetricsRegistryImpl(Logger.getLogger(MetricsRegistryImpl.class), INFO);
GarbageCollectionMetricSet.register(metricsRegistry);
gcStats = new GarbageCollectionMetricSet.GcStats();
}
use of com.hazelcast.internal.metrics.impl.MetricsRegistryImpl in project hazelcast by hazelcast.
the class OperatingSystemMetricSetTest method registerMethod_whenLong.
@Test
public void registerMethod_whenLong() {
metricsRegistry = new MetricsRegistryImpl(Logger.getLogger(MetricsRegistryImpl.class), INFO);
FakeOperatingSystemBean fakeOperatingSystemBean = new FakeOperatingSystemBean();
registerMethod(metricsRegistry, fakeOperatingSystemBean, "longMethod", "longMethod");
LongGauge gauge = metricsRegistry.newLongGauge("longMethod");
assertEquals(fakeOperatingSystemBean.longMethod(), gauge.read());
}
Aggregations