Search in sources :

Example 6 with DiskStats

use of com.emc.vipr.model.sys.healthmonitor.DiskStats in project coprhd-controller by CoprHD.

the class ProcStatsTest method testDiskStats.

@Test
public void testDiskStats() {
    try {
        Map<String, DiskStats> diskStatsMap = ProcStats.getDiskStats();
        DiskStats diskStats;
        for (String diskId : diskStatsMap.keySet()) {
            Assert.assertTrue(ACCEPTABLE_DISK_IDS.contains(diskId));
            diskStats = diskStatsMap.get(diskId);
            Assert.assertNotNull(diskStats);
            if (diskStats.getNumberOfReads() > 0) {
                Assert.assertTrue(diskStats.getReadTicks() > 0);
            }
            if (diskStats.getNumberOfWrites() > 0) {
                Assert.assertTrue(diskStats.getWriteTicks() > 0);
            }
        }
    } catch (Exception e) {
        Assert.fail();
    }
}
Also used : DiskStats(com.emc.vipr.model.sys.healthmonitor.DiskStats) Test(org.junit.Test)

Aggregations

DiskStats (com.emc.vipr.model.sys.healthmonitor.DiskStats)6 ServiceStats (com.emc.vipr.model.sys.healthmonitor.ServiceStats)2 HashMap (java.util.HashMap)2 Test (org.junit.Test)2 SyssvcException (com.emc.storageos.systemservices.exceptions.SyssvcException)1 CPUStats (com.emc.storageos.systemservices.impl.healthmonitor.models.CPUStats)1 DataDiskStats (com.emc.vipr.model.sys.healthmonitor.DataDiskStats)1 NodeStats (com.emc.vipr.model.sys.healthmonitor.NodeStats)1 DecimalFormat (java.text.DecimalFormat)1 ArrayList (java.util.ArrayList)1 Map (java.util.Map)1