fix(core): update

This commit is contained in:
Philipp Kunz 2021-08-14 21:41:06 +02:00
parent 2eb4bc5697
commit a425ed64c3

View File

@ -68,10 +68,10 @@ export class SmartMetrics {
if (!stats[stat]) continue;
memoryUsageBytes += stats[stat].memory;
}
let memoryUsageText = `${this.formatBytes(memoryUsageBytes)} / ${this.formatBytes(plugins.os.totalmem())}`;
let memoryPercentage = Math.round((memoryUsageBytes / plugins.os.totalmem()) * 100) / 100;
let memoryUsageText = `${this.formatBytes(memoryUsageBytes)} / ${this.formatBytes(1000000000)}`;
let memoryPercentage = Math.round((memoryUsageBytes / 1000000000) * 100) / 100;
// console.log(`${cpuUsageText} ||| ${memoryUsageText} `);
console.log(`${cpuUsageText} ||| ${memoryUsageText} `);
const returnMetrics: interfaces.IMetricsSnapshot = {
originalMetrics,