Search in sources :

Example 21 with CachePerfStats

use of org.apache.geode.internal.cache.CachePerfStats 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

CachePerfStats (org.apache.geode.internal.cache.CachePerfStats)21 Test (org.junit.Test)15 IntegrationTest (org.apache.geode.test.junit.categories.IntegrationTest)7 Compressor (org.apache.geode.compression.Compressor)6 RegionEntryContext (org.apache.geode.internal.cache.RegionEntryContext)6 UnitTest (org.apache.geode.test.junit.categories.UnitTest)6 AttributesFactory (org.apache.geode.cache.AttributesFactory)5 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)3 IOException (java.io.IOException)2 List (java.util.List)2 Properties (java.util.Properties)2 CancelException (org.apache.geode.CancelException)2 CacheException (org.apache.geode.cache.CacheException)2 CommitConflictException (org.apache.geode.cache.CommitConflictException)2 EntryEvent (org.apache.geode.cache.EntryEvent)2 RegionAttributes (org.apache.geode.cache.RegionAttributes)2 RegionExistsException (org.apache.geode.cache.RegionExistsException)2 TransactionEvent (org.apache.geode.cache.TransactionEvent)2 TransactionListener (org.apache.geode.cache.TransactionListener)2 ConfigurationProperties (org.apache.geode.distributed.ConfigurationProperties)2