Search in sources :

Example 11 with MetricsRegistry

use of com.hazelcast.internal.metrics.MetricsRegistry in project hazelcast by hazelcast.

the class ClientMetricsPropertiesTest method testDebugMetricsSysPropNotSet.

@Test
public void testDebugMetricsSysPropNotSet() {
    MetricsRegistry metricsRegistry = createClient().client.getMetricsRegistry();
    assertEquals(INFO, metricsRegistry.minimumLevel());
}
Also used : MetricsRegistry(com.hazelcast.internal.metrics.MetricsRegistry) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 12 with MetricsRegistry

use of com.hazelcast.internal.metrics.MetricsRegistry in project hazelcast by hazelcast.

the class ClientMetricsTest method testLongClientMetricIsMergedIntoMemberMetrics.

@Test
public void testLongClientMetricIsMergedIntoMemberMetrics() {
    HazelcastInstance memberInstance = givenMemberWithTwoClients();
    MetricsRegistry metricsRegistry = getNodeEngineImpl(memberInstance).getMetricsRegistry();
    // randomly chosen long client metric, we just check that
    // we have client-side metrics merged into the member metrics
    assertClientMetricsObservedEventually(memberInstance, metricsRegistry, "gc", "minorCount", COUNT);
}
Also used : MetricsRegistry(com.hazelcast.internal.metrics.MetricsRegistry) HazelcastInstance(com.hazelcast.core.HazelcastInstance) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 13 with MetricsRegistry

use of com.hazelcast.internal.metrics.MetricsRegistry in project hazelcast by hazelcast.

the class ClientMetricsTest method testDoubleClientMetricIsMergedIntoMemberMetrics.

@Test
public void testDoubleClientMetricIsMergedIntoMemberMetrics() {
    HazelcastInstance memberInstance = givenMemberWithTwoClients();
    MetricsRegistry metricsRegistry = getNodeEngineImpl(memberInstance).getMetricsRegistry();
    // randomly chosen double client metric, we just check that
    // we have client-side metrics merged into the member metrics
    assertClientMetricsObservedEventually(memberInstance, metricsRegistry, "os", "systemLoadAverage", null);
}
Also used : MetricsRegistry(com.hazelcast.internal.metrics.MetricsRegistry) HazelcastInstance(com.hazelcast.core.HazelcastInstance) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 14 with MetricsRegistry

use of com.hazelcast.internal.metrics.MetricsRegistry in project hazelcast by hazelcast.

the class ClientMetricsPropertiesTest method testDebugMetricsSysPropDisabled.

@Test
public void testDebugMetricsSysPropDisabled() {
    System.setProperty(ClientProperty.METRICS_DEBUG.getName(), "false");
    MetricsRegistry metricsRegistry = createClient().client.getMetricsRegistry();
    assertEquals(INFO, metricsRegistry.minimumLevel());
}
Also used : MetricsRegistry(com.hazelcast.internal.metrics.MetricsRegistry) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 15 with MetricsRegistry

use of com.hazelcast.internal.metrics.MetricsRegistry in project hazelcast by hazelcast.

the class ClientMetricsPropertiesTest method testDebugMetricsSysPropEnabled.

@Test
public void testDebugMetricsSysPropEnabled() {
    System.setProperty(ClientProperty.METRICS_DEBUG.getName(), "true");
    MetricsRegistry metricsRegistry = createClient().client.getMetricsRegistry();
    assertEquals(DEBUG, metricsRegistry.minimumLevel());
}
Also used : MetricsRegistry(com.hazelcast.internal.metrics.MetricsRegistry) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

MetricsRegistry (com.hazelcast.internal.metrics.MetricsRegistry)29 QuickTest (com.hazelcast.test.annotation.QuickTest)16 Test (org.junit.Test)16 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)10 HazelcastInstance (com.hazelcast.core.HazelcastInstance)6 MetricDescriptor (com.hazelcast.internal.metrics.MetricDescriptor)6 MetricsCollector (com.hazelcast.internal.metrics.collectors.MetricsCollector)4 Config (com.hazelcast.config.Config)2 NodeEngineImpl (com.hazelcast.spi.impl.NodeEngineImpl)2 ExecutionService (com.hazelcast.spi.impl.executionservice.ExecutionService)2 CacheConfig (com.hazelcast.config.CacheConfig)1 ConfigAccessor.getActiveMemberNetworkConfig (com.hazelcast.config.ConfigAccessor.getActiveMemberNetworkConfig)1 MemberAddressProviderConfig (com.hazelcast.config.MemberAddressProviderConfig)1 HazelcastThreadGroup (com.hazelcast.instance.HazelcastThreadGroup)1 Node (com.hazelcast.instance.Node)1 ProtocolType (com.hazelcast.instance.ProtocolType)1 Node (com.hazelcast.instance.impl.Node)1 ClusterServiceImpl (com.hazelcast.internal.cluster.impl.ClusterServiceImpl)1 IOThreadingModel (com.hazelcast.internal.networking.IOThreadingModel)1 Networking (com.hazelcast.internal.networking.Networking)1