From 7f276cfd21a16d1e6be5b159834695d434dcddb3 Mon Sep 17 00:00:00 2001 From: Eason <291028775@qq.com> Date: Sat, 14 Jan 2023 00:55:26 +0800 Subject: [PATCH] feat: update cpu usage --- src/components/AndroidPerfChart.vue | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/components/AndroidPerfChart.vue b/src/components/AndroidPerfChart.vue index a8189533..b637efe9 100644 --- a/src/components/AndroidPerfChart.vue +++ b/src/components/AndroidPerfChart.vue @@ -94,7 +94,6 @@ const getCpuDataGroup = () => { for (const j in props.sysPerf[i].cpuInfo.cpu) { result.push({ type: 'line', - stack: 'Total', name: j, data: props.sysPerf.map((obj) => { if (obj.cpuInfo) { @@ -149,17 +148,7 @@ const getCpuGroup = () => { name: j, data: props.sysPerf.map((obj) => { if (obj.cpuInfo) { - return ( - obj.cpuInfo[j].user + - obj.cpuInfo[j].system + - obj.cpuInfo[j].steal + - obj.cpuInfo[j].softIrq + - obj.cpuInfo[j].nice + - obj.cpuInfo[j].irq + - obj.cpuInfo[j].iowait + - obj.cpuInfo[j].idle + - obj.cpuInfo[j].guest - ); + return obj.cpuInfo[j].cpuUsage; } return 0; }),