Search in sources :

Example 6 with StoreLatencyPlugin

use of com.hazelcast.internal.diagnostics.StoreLatencyPlugin in project hazelcast by hazelcast.

the class LatencyTrackingMapStoreTest method setup.

@Before
public void setup() {
    hz = createHazelcastInstance();
    plugin = new StoreLatencyPlugin(getNodeEngineImpl(hz));
    delegate = mock(MapStore.class);
    cacheStore = new LatencyTrackingMapStore<String, String>(delegate, plugin, NAME);
}
Also used : StoreLatencyPlugin(com.hazelcast.internal.diagnostics.StoreLatencyPlugin) MapStore(com.hazelcast.core.MapStore) Before(org.junit.Before)

Example 7 with StoreLatencyPlugin

use of com.hazelcast.internal.diagnostics.StoreLatencyPlugin in project hazelcast by hazelcast.

the class MapStoreWrapper method instrument.

public void instrument(NodeEngine nodeEngine) {
    Diagnostics diagnostics = ((NodeEngineImpl) nodeEngine).getDiagnostics();
    StoreLatencyPlugin storeLatencyPlugin = diagnostics.getPlugin(StoreLatencyPlugin.class);
    if (storeLatencyPlugin == null) {
        return;
    }
    if (mapLoader != null) {
        this.mapLoader = new LatencyTrackingMapLoader(mapLoader, storeLatencyPlugin, mapName);
    }
    if (mapStore != null) {
        this.mapStore = new LatencyTrackingMapStore(mapStore, storeLatencyPlugin, mapName);
    }
}
Also used : NodeEngineImpl(com.hazelcast.spi.impl.NodeEngineImpl) Diagnostics(com.hazelcast.internal.diagnostics.Diagnostics) StoreLatencyPlugin(com.hazelcast.internal.diagnostics.StoreLatencyPlugin)

Example 8 with StoreLatencyPlugin

use of com.hazelcast.internal.diagnostics.StoreLatencyPlugin in project hazelcast by hazelcast.

the class LatencyTrackingCacheWriterTest method setup.

@Before
@SuppressWarnings("unchecked")
public void setup() {
    HazelcastInstance hz = createHazelcastInstance();
    plugin = new StoreLatencyPlugin(getNodeEngineImpl(hz));
    delegate = mock(CacheWriter.class);
    cacheWriter = new LatencyTrackingCacheWriter<Integer, String>(delegate, plugin, NAME);
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) StoreLatencyPlugin(com.hazelcast.internal.diagnostics.StoreLatencyPlugin) CacheWriter(javax.cache.integration.CacheWriter) Before(org.junit.Before)

Example 9 with StoreLatencyPlugin

use of com.hazelcast.internal.diagnostics.StoreLatencyPlugin in project hazelcast by hazelcast.

the class RingbufferStoreWrapper method instrument.

void instrument(NodeEngine nodeEngine) {
    Diagnostics diagnostics = ((NodeEngineImpl) nodeEngine).getDiagnostics();
    StoreLatencyPlugin storeLatencyPlugin = diagnostics.getPlugin(StoreLatencyPlugin.class);
    if (!enabled || storeLatencyPlugin == null) {
        return;
    }
    this.store = new LatencyTrackingRingbufferStore(store, storeLatencyPlugin, name);
}
Also used : NodeEngineImpl(com.hazelcast.spi.impl.NodeEngineImpl) Diagnostics(com.hazelcast.internal.diagnostics.Diagnostics) StoreLatencyPlugin(com.hazelcast.internal.diagnostics.StoreLatencyPlugin)

Example 10 with StoreLatencyPlugin

use of com.hazelcast.internal.diagnostics.StoreLatencyPlugin in project hazelcast by hazelcast.

the class LatencyTrackingQueueStoreTest method setup.

@Before
public void setup() {
    hz = createHazelcastInstance();
    plugin = new StoreLatencyPlugin(getNodeEngineImpl(hz));
    delegate = mock(QueueStore.class);
    queueStore = new LatencyTrackingQueueStore<String>(delegate, plugin, NAME);
}
Also used : StoreLatencyPlugin(com.hazelcast.internal.diagnostics.StoreLatencyPlugin) QueueStore(com.hazelcast.core.QueueStore) Before(org.junit.Before)

Aggregations

StoreLatencyPlugin (com.hazelcast.internal.diagnostics.StoreLatencyPlugin)10 Before (org.junit.Before)6 Diagnostics (com.hazelcast.internal.diagnostics.Diagnostics)3 NodeEngineImpl (com.hazelcast.spi.impl.NodeEngineImpl)3 HazelcastInstance (com.hazelcast.core.HazelcastInstance)2 MapLoader (com.hazelcast.core.MapLoader)1 MapStore (com.hazelcast.core.MapStore)1 QueueStore (com.hazelcast.core.QueueStore)1 RingbufferStore (com.hazelcast.core.RingbufferStore)1 BuildInfoPlugin (com.hazelcast.internal.diagnostics.BuildInfoPlugin)1 ConfigPropertiesPlugin (com.hazelcast.internal.diagnostics.ConfigPropertiesPlugin)1 InvocationPlugin (com.hazelcast.internal.diagnostics.InvocationPlugin)1 MemberHazelcastInstanceInfoPlugin (com.hazelcast.internal.diagnostics.MemberHazelcastInstanceInfoPlugin)1 MetricsPlugin (com.hazelcast.internal.diagnostics.MetricsPlugin)1 OverloadedConnectionsPlugin (com.hazelcast.internal.diagnostics.OverloadedConnectionsPlugin)1 PendingInvocationsPlugin (com.hazelcast.internal.diagnostics.PendingInvocationsPlugin)1 SlowOperationPlugin (com.hazelcast.internal.diagnostics.SlowOperationPlugin)1 SystemLogPlugin (com.hazelcast.internal.diagnostics.SystemLogPlugin)1 SystemPropertiesPlugin (com.hazelcast.internal.diagnostics.SystemPropertiesPlugin)1 CacheLoader (javax.cache.integration.CacheLoader)1