Search in sources :

Example 1 with DiskStoreStats

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());
}
Also used : DiskStoreStats(org.apache.geode.internal.cache.DiskStoreStats) Test(org.junit.Test) IntegrationTest(org.apache.geode.test.junit.categories.IntegrationTest)

Example 2 with DiskStoreStats

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);
}
Also used : DiskStoreMBeanBridge(org.apache.geode.management.internal.beans.DiskStoreMBeanBridge) DiskStoreStats(org.apache.geode.internal.cache.DiskStoreStats)

Example 3 with 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);
    }
}
Also used : FunctionServiceStats(org.apache.geode.internal.cache.execute.FunctionServiceStats) CachePerfStats(org.apache.geode.internal.cache.CachePerfStats) MemberMBeanBridge(org.apache.geode.management.internal.beans.MemberMBeanBridge) VMStatsContract(org.apache.geode.internal.statistics.VMStatsContract) DLockStats(org.apache.geode.distributed.internal.locks.DLockStats) DiskStoreStats(org.apache.geode.internal.cache.DiskStoreStats) PartitionedRegionStats(org.apache.geode.internal.cache.PartitionedRegionStats) DistributionStats(org.apache.geode.distributed.internal.DistributionStats) VMStats50(org.apache.geode.internal.stats50.VMStats50)

Aggregations

DiskStoreStats (org.apache.geode.internal.cache.DiskStoreStats)3 DistributionStats (org.apache.geode.distributed.internal.DistributionStats)1 DLockStats (org.apache.geode.distributed.internal.locks.DLockStats)1 CachePerfStats (org.apache.geode.internal.cache.CachePerfStats)1 PartitionedRegionStats (org.apache.geode.internal.cache.PartitionedRegionStats)1 FunctionServiceStats (org.apache.geode.internal.cache.execute.FunctionServiceStats)1 VMStatsContract (org.apache.geode.internal.statistics.VMStatsContract)1 VMStats50 (org.apache.geode.internal.stats50.VMStats50)1 DiskStoreMBeanBridge (org.apache.geode.management.internal.beans.DiskStoreMBeanBridge)1 MemberMBeanBridge (org.apache.geode.management.internal.beans.MemberMBeanBridge)1 IntegrationTest (org.apache.geode.test.junit.categories.IntegrationTest)1 Test (org.junit.Test)1