解决cpu统计结果缺失问题

This commit is contained in:
wangchengming 2025-04-19 22:50:14 +08:00
parent 2356973ac8
commit 4d8abf16d1

View File

@ -267,9 +267,9 @@ export default {
let minutes = date.getMinutes();
let xlable = hours + ':' + minutes
this.cpuInfo.cpuCoreCount = res.result.cpuCoreCount
this.userCpuUsage = res.result.userCpuUsage
this.systemCpuUsage = res.result.systemCpuUsage
this.idleCpuUsage = res.result.idleCpuUsage
this.cpuInfo.userCpuUsage = res.result.userCpuUsage
this.cpuInfo.systemCpuUsage = res.result.systemCpuUsage
this.cpuInfo.idleCpuUsage = res.result.idleCpuUsage
this.cpuInfo.chartDate.xData.push(xlable)
this.cpuInfo.chartDate.y1Data.push(res.result.userCpuUsage)
this.cpuInfo.chartDate.y2Data.push(res.result.systemCpuUsage)