use of org.apache.geode.internal.cache.DiskStoreStats in project geode by apache.
the class MemberLevelStatsJUnitTest method testDiskCounters.
@Test
public void testDiskCounters() throws InterruptedException {
for (DiskStoreStats stats : diskStatsList) {
stats.startRead();
stats.startWrite();
stats.startBackup();
stats.incWrittenBytes(200, false);
stats.startFlush();
}
sample();
assertEquals(4, getTotalBackupInProgress());
assertTrue(getDiskWritesRate() > 0);
for (DiskStoreStats stats : diskStatsList) {
stats.endRead(testStartTime, 20);
stats.endWrite(testStartTime);
stats.endBackup();
stats.endFlush(testStartTime);
}
sample();
assertEquals(4, getTotalBackupCompleted());
assertTrue(getDiskFlushAvgLatency() > 0);
assertTrue(getDiskReadsRate() > 0);
for (DiskStoreStats stats : diskStatsList) {
bridge.removeDiskStoreStats(stats);
stats.close();
}
assertEquals(4, getTotalBackupCompleted());
}
use of org.apache.geode.internal.cache.DiskStoreStats in project geode by apache.
the class DiskStatsJUnitTest method init.
public void init() {
diskStoreStats = new DiskStoreStats(system, "test");
bridge = new DiskStoreMBeanBridge();
bridge.addDiskStoreStats(diskStoreStats);
}
use of org.apache.geode.internal.cache.DiskStoreStats 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