Use cpuCount in graphs

This commit is contained in:
Johannes Zellner
2022-10-13 23:05:10 +02:00
parent 6533f9e98f
commit 2a9e177a38
2 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -799,9 +799,10 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
if (error) return console.error(error);
var currentMemoryLimit = $scope.app.memoryLimit || $scope.app.manifest.memoryLimit || (256 * 1024 * 1024);
var cpuCount = result.cpuCount;
fillGraph('#graphsMemoryChart', [{ data: result.memory, label: 'Memory' }], 'memoryChart', 1024 * 1024, currentMemoryLimit / 1024 / 1024, 'GiB', 1024);
fillGraph('#graphsCpuChart', [{ data: result.cpu, label: 'CPU' }], 'cpuChart', 1, 100, '%');
fillGraph('#graphsCpuChart', [{ data: result.cpu, label: 'CPU' }], 'cpuChart', 1, cpuCount * 100, '%');
fillGraph('#graphsDiskChart', [{ data: result.blockRead, label: 'Read' }, { data: result.blockWrite, label: 'Write' }], 'diskChart', 1024 * 1024, null, 'KiB');
fillGraph('#graphsNetworkChart', [{ data: result.networkRead, label: 'Incoming' }, { data: result.networkWrite, label: 'Outgoing' }], 'networkChart', 1024 * 1024, null, 'KiB');