From 7b64754e5d1aa3ea3b63347bc5637bae9795e193 Mon Sep 17 00:00:00 2001 From: Daniel d'Andrada Date: Wed, 21 Feb 2018 14:23:26 +0100 Subject: Show numbers about overall memory consumption in the performance overlay 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 --- sysui/dev/ProcessMonitor/RamMonitor.qml | 4 ++-- 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" } } } -- cgit v1.2.1