mirror of
https://github.com/syuilo/ai.git
synced 2025-03-25 21:12:56 +00:00
commit
6e2a81fc76
1 changed files with 0 additions and 1 deletions
|
@ -39,7 +39,6 @@ export default class extends Module {
|
||||||
private check() {
|
private check() {
|
||||||
const average = (arr) => arr.reduce((a, b) => a + b) / arr.length;
|
const average = (arr) => arr.reduce((a, b) => a + b) / arr.length;
|
||||||
|
|
||||||
console.log('statsLogs', this.statsLogs)
|
|
||||||
const cpuPercentages = this.statsLogs.map(s => s && (s.cpu_usage || s.cpu) * 100 || 0);
|
const cpuPercentages = this.statsLogs.map(s => s && (s.cpu_usage || s.cpu) * 100 || 0);
|
||||||
const cpuPercentage = average(cpuPercentages);
|
const cpuPercentage = average(cpuPercentages);
|
||||||
if (cpuPercentage >= 70) {
|
if (cpuPercentage >= 70) {
|
||||||
|
|
Loading…
Reference in a new issue