use of com.hazelcast.map.LocalMapStats in project hazelcast by hazelcast.
the class LocalMultiMapStatsTest method testOtherOperationCount_containsValue.
@Test
public void testOtherOperationCount_containsValue() {
MultiMap map = getMultiMap();
for (int i = 0; i < OPERATION_COUNT; i++) {
map.containsValue(1);
}
LocalMapStats stats = getMultiMapStats();
assertEquals(OPERATION_COUNT, stats.getOtherOperationCount());
}
use of com.hazelcast.map.LocalMapStats in project hazelcast by hazelcast.
the class LocalMultiMapStatsTest method testDelete.
@Test
public void testDelete() {
MultiMap<Integer, Integer> map = getMultiMap();
for (int i = 0; i < 100; i++) {
map.put(i, i);
map.delete(i);
}
LocalMapStats localMapStats = getMultiMapStats();
assertEquals(100, localMapStats.getRemoveOperationCount());
}
use of com.hazelcast.map.LocalMapStats in project hazelcast by hazelcast.
the class LocalMultiMapStatsTest method testHitCountNotLost_whenKeysAreRemoved.
@Test
@Ignore("https://github.com/hazelcast/hazelcast/issues/19382")
public void testHitCountNotLost_whenKeysAreRemoved() {
MultiMap<Integer, Integer> map = getMultiMap();
for (int i = 0; i < 100; i++) {
map.put(i, i);
map.get(i);
}
for (int i = 0; i < 50; i++) {
map.remove(i);
}
LocalMapStats localMapStats = getMultiMapStats();
assertEquals(100, localMapStats.getHits());
}
use of com.hazelcast.map.LocalMapStats in project hazelcast by hazelcast.
the class LocalMultiMapStatsTest method testGetAndHitsGenerated.
@Test
public void testGetAndHitsGenerated() {
MultiMap<Integer, Integer> map = getMultiMap();
for (int i = 0; i < 100; i++) {
map.put(i, i);
map.get(i);
}
LocalMapStats localMapStats = getMultiMapStats();
assertEquals(100, localMapStats.getGetOperationCount());
assertEquals(100, localMapStats.getHits());
}
use of com.hazelcast.map.LocalMapStats in project hazelcast by hazelcast.
the class LocalMultiMapStatsTest method testLockedEntryCount_multiMapWithOneEntry.
@Test
public void testLockedEntryCount_multiMapWithOneEntry() {
MultiMap<String, String> map = getMultiMap();
map.put("key", "value");
map.lock("key");
map.lock("non-existent-key");
LocalMapStats stats = getMultiMapStats();
assertEquals(2, stats.getLockedEntryCount());
}
Aggregations