Search in sources :

Example 16 with MetricsRegistry

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

the class RaftService method init.

@Override
public void init(NodeEngine nodeEngine, Properties properties) {
    if (!metadataGroupManager.init()) {
        return;
    }
    if (config.getMissingCPMemberAutoRemovalSeconds() > 0) {
        ExecutionService executionService = nodeEngine.getExecutionService();
        executionService.scheduleWithRepetition(CP_SUBSYSTEM_MANAGEMENT_EXECUTOR, new AutoRemoveMissingCPMemberTask(), REMOVE_MISSING_MEMBER_TASK_PERIOD_SECONDS, REMOVE_MISSING_MEMBER_TASK_PERIOD_SECONDS, SECONDS);
    }
    MetricsRegistry metricsRegistry = this.nodeEngine.getMetricsRegistry();
    metricsRegistry.scheduleAtFixedRate(new PublishNodeMetricsTask(), metricsPeriod, SECONDS, ProbeLevel.INFO);
}
Also used : MetricsRegistry(com.hazelcast.internal.metrics.MetricsRegistry) ExecutionService(com.hazelcast.spi.impl.executionservice.ExecutionService)

Example 17 with MetricsRegistry

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

the class AtomicLongService method init.

@Override
public void init(NodeEngine nodeEngine, Properties properties) {
    super.init(nodeEngine, properties);
    MetricsRegistry metricsRegistry = this.nodeEngine.getMetricsRegistry();
    metricsRegistry.registerDynamicMetricsProvider(this);
}
Also used : MetricsRegistry(com.hazelcast.internal.metrics.MetricsRegistry)

Example 18 with MetricsRegistry

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

the class AtomicRefService method init.

@Override
public void init(NodeEngine nodeEngine, Properties properties) {
    super.init(nodeEngine, properties);
    MetricsRegistry metricsRegistry = this.nodeEngine.getMetricsRegistry();
    metricsRegistry.registerDynamicMetricsProvider(this);
}
Also used : MetricsRegistry(com.hazelcast.internal.metrics.MetricsRegistry)

Example 19 with MetricsRegistry

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

the class DefaultNodeContext method createServer.

@Override
public Server createServer(Node node, ServerSocketRegistry registry, LocalAddressRegistry addressRegistry) {
    TcpServerContext context = new TcpServerContext(node, node.nodeEngine);
    Networking networking = createNetworking(node);
    Config config = node.getConfig();
    MetricsRegistry metricsRegistry = node.nodeEngine.getMetricsRegistry();
    return new TcpServer(config, context, registry, addressRegistry, metricsRegistry, networking, node.getNodeExtension().createChannelInitializerFn(context));
}
Also used : MetricsRegistry(com.hazelcast.internal.metrics.MetricsRegistry) Networking(com.hazelcast.internal.networking.Networking) NioNetworking(com.hazelcast.internal.networking.nio.NioNetworking) Config(com.hazelcast.config.Config) ConfigAccessor.getActiveMemberNetworkConfig(com.hazelcast.config.ConfigAccessor.getActiveMemberNetworkConfig) MemberAddressProviderConfig(com.hazelcast.config.MemberAddressProviderConfig) TcpServerContext(com.hazelcast.internal.server.tcp.TcpServerContext) TcpServer(com.hazelcast.internal.server.tcp.TcpServer)

Example 20 with MetricsRegistry

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

the class DistributedDatastructuresMetricsTest method assertHasStatsEventually.

private void assertHasStatsEventually(final String dsName, final String metricPrefix) {
    final MetricsRegistry registry = getNode(hz).nodeEngine.getMetricsRegistry();
    assertTrueEventually(() -> {
        final StringMetricsCollector collector = new StringMetricsCollector(dsName, metricPrefix);
        registry.collect(collector);
        assertFalse(collector.probes.isEmpty());
    });
}
Also used : MetricsRegistry(com.hazelcast.internal.metrics.MetricsRegistry)

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