diff options
author | Daniel d'Andrada <daniel.dandrada@luxoft.com> | 2018-02-21 14:23:26 +0100 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2018-02-23 15:49:43 +0000 |
commit | 7b64754e5d1aa3ea3b63347bc5637bae9795e193 (patch) | |
tree | 272fa5f527872a3961427de8001a7ff735281bd5 | |
parent | 0c3657b1620606a82bfda039f35d70d9efd68753 (diff) | |
download | neptune-ui-7b64754e5d1aa3ea3b63347bc5637bae9795e193.tar.gz |
Makes more sense then the process RAM consumption which is only about the
system UI (and doesn't even includes the apps, when in multi-process mode)
Task-number: QTAUTO-807
Change-Id: I9b7745e20c2fbe514b1e29826f3137f3a865fcec
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
-rw-r--r-- | sysui/dev/ProcessMonitor/RamMonitor.qml | 4 | ||||
-rw-r--r-- | sysui/dev/ProcessMonitor/ToolBarMonitor.qml | 16 |
2 files changed, 9 insertions, 11 deletions
diff --git a/sysui/dev/ProcessMonitor/RamMonitor.qml b/sysui/dev/ProcessMonitor/RamMonitor.qml index 1a96d11..ba49a86 100644 --- a/sysui/dev/ProcessMonitor/RamMonitor.qml +++ b/sysui/dev/ProcessMonitor/RamMonitor.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 Pelagicore AG +** Copyright (C) 2018 Pelagicore AG ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Neptune IVI UI. @@ -47,7 +47,7 @@ MonitorPanel { Rectangle { width: parent.width height: 3 - y: parent.height - height - (model.memoryPss.total/SystemMonitor.totalMemory)*parent.height + y: parent.height - height - (model.memoryUsed/SystemMonitor.totalMemory)*parent.height } } } diff --git a/sysui/dev/ProcessMonitor/ToolBarMonitor.qml b/sysui/dev/ProcessMonitor/ToolBarMonitor.qml index 8d8bc7e..d1777b9 100644 --- a/sysui/dev/ProcessMonitor/ToolBarMonitor.qml +++ b/sysui/dev/ProcessMonitor/ToolBarMonitor.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 Pelagicore AG +** Copyright (C) 2018 Pelagicore AG ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Neptune IVI UI. @@ -45,8 +45,6 @@ Rectangle { opacity: 0.95 property int currentFps: 0 - property int ram: 0 - property real ramUsed: 0 property int cpu: 0 property var rootWindow property var applicationWindows: [] @@ -61,6 +59,7 @@ Rectangle { SystemMonitor.reportingInterval = root.reportingInterval SystemMonitor.count = root.modelCount SystemMonitor.cpuLoadReportingEnabled = root.visible + SystemMonitor.memoryReportingEnabled = root.visible root.rootWindow = Window.window } @@ -88,10 +87,6 @@ Rectangle { memoryReportingEnabled: root.visible frameRateReportingEnabled: root.visible monitoredWindows: (applicationId === "" || ApplicationManager.singleProcess) ? [root.rootWindow] : root.applicationWindows - onMemoryReportingChanged: { - root.ram = (memoryPss.total/SystemMonitor.totalMemory * 100).toFixed(0) - root.ramUsed = (memoryPss.total / 1e6).toFixed(0); - } onFrameRateReportingChanged: { fpsMonitor.valueText = "" for (var i in frameRate) { @@ -126,8 +121,11 @@ Rectangle { } RamMonitor { - model: processMon - valueText: root.ram + "% " + root.ramUsed + "MB" + model: SystemMonitor + readonly property int ramUsedPercentage: (ramUsedBytes / ramTotalBytes ) * 100 + readonly property real ramTotalBytes: (SystemMonitor.totalMemory / 1e6).toFixed(0) + readonly property real ramUsedBytes: (SystemMonitor.memoryUsed / 1e6).toFixed(0) + valueText: ramUsedPercentage + "% " + ramUsedBytes + "MB" } } } |