Skip to content

Commit 9284baf

Browse files
Jason WilsonJason Wilson
authored andcommitted
Round cpu percentage to nearest decimal.
1 parent 0c29776 commit 9284baf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/views/cpu-view.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class CpuView {
4343
}
4444

4545
onEvent(data) {
46-
this.line.setLabel(` cpu utilization (${data.cpu.utilization}%) `);
46+
this.line.setLabel(` cpu utilization (${data.cpu.utilization.toFixed(1)}%) `);
4747
this.cpuHistory.push(data.cpu.utilization);
4848
if (this.cpuHistory.length > this.historyDepth) {
4949
this.cpuHistory.shift();

0 commit comments

Comments
 (0)