use of org.apache.geode.internal.cache.PartitionedRegionStats in project geode by apache.
the class MemberLevelStatsJUnitTest method testRegionCounters.
@Test
public void testRegionCounters() throws InterruptedException {
for (PartitionedRegionStats stats : parRegionStatsList) {
stats.incBucketCount(1);
stats.incPrimaryBucketCount(1);
stats.incDataStoreEntryCount(1);
}
sample();
assertEquals(4, getTotalBucketCount());
assertEquals(4, getTotalBucketSize());
assertEquals(4, getTotalPrimaryBucketCount());
for (PartitionedRegionStats stats : parRegionStatsList) {
bridge.removePartionRegionStats(stats);
stats.close();
}
sample();
assertEquals(0, getTotalBucketCount());
assertEquals(0, getTotalBucketSize());
assertEquals(0, getTotalPrimaryBucketCount());
}
use of org.apache.geode.internal.cache.PartitionedRegionStats in project geode by apache.
the class RegionStatsJUnitTest method init.
protected void init() {
cachePerfStats = new CachePerfStats(system);
partitionedRegionStats = new PartitionedRegionStats(system, "/tests");
diskRegionStats = new DiskRegionStats(system, "test-disk");
bridge = new RegionMBeanBridge(cachePerfStats);
parBridge = new PartitionedRegionBridge(partitionedRegionStats);
diskBridge = new DiskRegionBridge(diskRegionStats);
}
use of org.apache.geode.internal.cache.PartitionedRegionStats in project geode by apache.
the class MemberLevelStatsJUnitTest method init.
public void init() {
cachePerfStats = new CachePerfStats(system);
funcServiceStats = new FunctionServiceStats(system, "FunctionExecution");
long statId = OSProcess.getId();
distributionStats = new DistributionStats(system, statId);
DistributionStats.enableClockStats = true;
dlockStats = new DLockStats(system, statId);
bridge = new MemberMBeanBridge();
bridge.addCacheStats(cachePerfStats);
bridge.addFunctionStats(funcServiceStats);
bridge.addDistributionStats(distributionStats);
bridge.addLockServiceStats(dlockStats);
VMStatsContract vmstats = system.getStatSampler().getVMStats();
assertTrue(vmstats instanceof VMStats50);
bridge.addSystemStats();
bridge.addVMStats();
for (int i = 0; i < 4; i++) {
DiskStoreStats stats = new DiskStoreStats(system, name.getMethodName() + i);
diskStatsList.add(stats);
bridge.addDiskStoreStats(stats);
}
for (int i = 0; i < 4; i++) {
PartitionedRegionStats stats = new PartitionedRegionStats(system, name.getMethodName() + i);
parRegionStatsList.add(stats);
bridge.addPartionRegionStats(stats);
}
}
Aggregations