use of com.hazelcast.internal.monitor.impl.LocalMapStatsImpl in project hazelcast by hazelcast.
the class LocalMapStatsProvider method createLocalMapStats.
public LocalMapStatsImpl createLocalMapStats(String mapName) {
LocalMapStatsImpl stats = getLocalMapStatsImpl(mapName);
LocalMapOnDemandCalculatedStats onDemandStats = new LocalMapOnDemandCalculatedStats();
addNearCacheStats(mapName, stats, onDemandStats);
addIndexStats(mapName, stats);
updateMapOnDemandStats(mapName, onDemandStats);
return onDemandStats.updateAndGet(stats);
}
use of com.hazelcast.internal.monitor.impl.LocalMapStatsImpl in project hazelcast by hazelcast.
the class MultiMapEntrySetMessageTask method reduce.
@Override
protected Object reduce(Map<Integer, Object> map) {
List<Map.Entry<Data, Data>> entries = new ArrayList<>();
for (Object obj : map.values()) {
if (obj == null) {
continue;
}
EntrySetResponse response = (EntrySetResponse) obj;
entries.addAll(response.getDataEntrySet());
}
updateStats(LocalMapStatsImpl::incrementOtherOperations);
return entries;
}
use of com.hazelcast.internal.monitor.impl.LocalMapStatsImpl in project hazelcast by hazelcast.
the class MultiMapKeySetMessageTask method reduce.
@Override
protected Object reduce(Map<Integer, Object> map) {
List<Data> keys = new ArrayList<Data>();
for (Object obj : map.values()) {
if (obj == null) {
continue;
}
MultiMapResponse response = (MultiMapResponse) obj;
Collection<Data> coll = response.getCollection();
if (coll != null) {
keys.addAll(coll);
}
}
updateStats(LocalMapStatsImpl::incrementOtherOperations);
return keys;
}
use of com.hazelcast.internal.monitor.impl.LocalMapStatsImpl in project hazelcast by hazelcast.
the class NearCachedClientMapProxy method getLocalMapStats.
@Override
public LocalMapStats getLocalMapStats() {
LocalMapStatsImpl localMapStats = (LocalMapStatsImpl) super.getLocalMapStats();
localMapStats.setNearCacheStats(nearCache.getNearCacheStats());
return localMapStats;
}
use of com.hazelcast.internal.monitor.impl.LocalMapStatsImpl in project hazelcast by hazelcast.
the class PhoneHomeTest method testMapPutLatencyWithoutMapStore.
@Test
public void testMapPutLatencyWithoutMapStore() {
Map<String, String> parameters;
parameters = phoneHome.phoneHome(true);
assertEquals(parameters.get(PhoneHomeMetrics.AVERAGE_PUT_LATENCY_OF_MAPS_WITHOUT_MAPSTORE.getRequestParameterName()), "-1");
IMap<Object, Object> iMap = node.hazelcastInstance.getMap("hazelcast");
LocalMapStatsImpl localMapStats = (LocalMapStatsImpl) iMap.getLocalMapStats();
localMapStats.incrementPutLatencyNanos(2000000000L);
parameters = phoneHome.phoneHome(true);
assertEquals(parameters.get(PhoneHomeMetrics.AVERAGE_PUT_LATENCY_OF_MAPS_WITHOUT_MAPSTORE.getRequestParameterName()), String.valueOf(2000));
localMapStats.incrementPutLatencyNanos(1000000000L);
parameters = phoneHome.phoneHome(true);
assertEquals(parameters.get(PhoneHomeMetrics.AVERAGE_PUT_LATENCY_OF_MAPS_WITHOUT_MAPSTORE.getRequestParameterName()), String.valueOf(1500));
localMapStats.incrementPutLatencyNanos(2000000000L);
parameters = phoneHome.phoneHome(true);
assertEquals(parameters.get(PhoneHomeMetrics.AVERAGE_PUT_LATENCY_OF_MAPS_WITHOUT_MAPSTORE.getRequestParameterName()), String.valueOf(1666));
}
Aggregations