6526682: JConsole shows negative CPU Usage

Reviewed-by: alanb, mchung
This commit is contained in:
Nils Loodin 2013-06-03 16:13:44 +02:00
parent fdd231289a
commit 4b74b9fdcc

View File

@ -360,6 +360,8 @@ class SummaryTab extends Tab {
Math.min(99F,
elapsedCpu / (elapsedTime * 10000F * result.nCPUs));
cpuUsage = Math.max(0F, cpuUsage);
getPlotter().addValues(result.timeStamp,
Math.round(cpuUsage * Math.pow(10.0, CPU_DECIMALS)));
getInfoLabel().setText(Resources.format(Messages.CPU_USAGE_FORMAT,