fix(core): update

This commit is contained in:
Philipp Kunz 2021-08-13 13:13:11 +02:00
parent e98b1779e1
commit 8f0ebccb58

View File

@ -49,11 +49,9 @@ export class SmartMetrics {
cpu.times.irq +
cpu.times.idle;
}
// Normalize the one returned by process.cpuUsage()
// (microseconds VS miliseconds)
const usage = process.cpuUsage();
const currentCPUUsage = (usage.user + usage.system) * 1000;
const currentCPUUsage = (usage.user + usage.system);
// Find out the percentage used for this specific CPU
const perc = (currentCPUUsage / total) * 100;