fix ProcCpu.getPercent assertion per SIGAR-145

This commit is contained in:
Doug MacEachern 2010-04-21 15:20:05 -07:00
parent b3078dca91
commit 30e8d0e2c1
1 changed files with 2 additions and 1 deletions

View File

@ -54,6 +54,7 @@ public class TestProcTime extends SigarTestCase {
double value = procTime.getPercent() * 100.0;
traceln("Percent=" + value);
assertTrue(value >= 0.0);
assertTrue(value <= 100.0);
int ncpu = sigar.getCpuList().length;
assertTrue(value <= (100.0 * ncpu)); //SIGAR-145 Irix mode
}
}