fix(core): update
This commit is contained in:
parent
0972f1c64d
commit
dd46f0d90b
@ -60,7 +60,7 @@ export class SmartMetrics {
|
|||||||
if (!stats[stat]) continue;
|
if (!stats[stat]) continue;
|
||||||
cpuPercentage += stats[stat].cpu / 100;
|
cpuPercentage += stats[stat].cpu / 100;
|
||||||
}
|
}
|
||||||
let cpuUsageText = `${cpuPercentage * 100} %`;
|
let cpuUsageText = `${Math.round(cpuPercentage * 10000) / 100} %`;
|
||||||
|
|
||||||
// lets compute memory usage
|
// lets compute memory usage
|
||||||
let memoryUsageBytes = 0;
|
let memoryUsageBytes = 0;
|
||||||
@ -71,6 +71,8 @@ export class SmartMetrics {
|
|||||||
let memoryUsageText = `${this.formatBytes(memoryUsageBytes)} / ${this.formatBytes(plugins.os.totalmem())}`;
|
let memoryUsageText = `${this.formatBytes(memoryUsageBytes)} / ${this.formatBytes(plugins.os.totalmem())}`;
|
||||||
let memoryPercentage = Math.round((memoryUsageBytes / plugins.os.totalmem()) * 100) / 100;
|
let memoryPercentage = Math.round((memoryUsageBytes / plugins.os.totalmem()) * 100) / 100;
|
||||||
|
|
||||||
|
// console.log(`${cpuUsageText} ||| ${memoryUsageText} `);
|
||||||
|
|
||||||
const returnMetrics: interfaces.IMetricsSnapshot = {
|
const returnMetrics: interfaces.IMetricsSnapshot = {
|
||||||
originalMetrics,
|
originalMetrics,
|
||||||
process_cpu_seconds_total: (
|
process_cpu_seconds_total: (
|
||||||
|
Loading…
Reference in New Issue
Block a user