- Timestamp:
- Mar 20, 2020 9:24:43 AM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 3 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r83334 r83345 333 333 ./src/manager/tools \ 334 334 ./src/monitor \ 335 ./src/monitor/resource 335 ./src/monitor/resource \ 336 ./src/monitor/performance 336 337 337 338 ifdef VBOX_GUI_WITH_NETWORK_MANAGER … … 719 720 VirtualBoxVM_QT_MOCHDRS = \ 720 721 src/globals/UIStarter.h \ 722 src/monitor/performance/UIPerformanceMonitor.h \ 721 723 src/runtime/UIConsoleEventHandler.h \ 722 724 src/runtime/UIFrameBuffer.h \ … … 737 739 src/runtime/information/UIInformationConfiguration.h \ 738 740 src/runtime/information/UIVMInformationDialog.h \ 739 src/runtime/information/UIInformationPerformanceMonitor.h \740 741 src/runtime/information/UIInformationRuntime.h \ 741 742 src/guestctrl/UIFileManager.h \ … … 977 978 # 978 979 VirtualBoxVM_QT_MOCSRCS = \ 980 src/monitor/performance/UIPerformanceMonitor.cpp \ 979 981 src/runtime/UIConsoleEventHandler.cpp \ 980 982 src/runtime/UIFrameBuffer.cpp \ 981 983 src/runtime/UIIndicatorsPool.cpp \ 982 src/runtime/information/UIInformationPerformanceMonitor.cpp \983 984 src/runtime/information/UIInformationRuntime.cpp \ 984 985 src/guestctrl/UIFileManager.cpp \ … … 1190 1191 src/main.cpp \ 1191 1192 src/globals/UIStarter.cpp \ 1193 src/monitor/performance/UIPerformanceMonitor.cpp \ 1192 1194 src/runtime/UIConsoleEventHandler.cpp \ 1193 1195 src/runtime/UIFrameBuffer.cpp \ … … 1208 1210 src/runtime/information/UIInformationConfiguration.cpp \ 1209 1211 src/runtime/information/UIVMInformationDialog.cpp \ 1210 src/runtime/information/UIInformationPerformanceMonitor.cpp \1211 1212 src/runtime/information/UIInformationRuntime.cpp \ 1212 1213 src/guestctrl/UIFileManager.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/monitor/performance/UIPerformanceMonitor.cpp
r83344 r83345 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI InformationPerformanceMonitor class implementation.3 * VBox Qt GUI - UIPerformanceMonitor class implementation. 4 4 */ 5 5 … … 29 29 /* GUI includes: */ 30 30 #include "UICommon.h" 31 #include "UI InformationPerformanceMonitor.h"31 #include "UIPerformanceMonitor.h" 32 32 #include "UISession.h" 33 33 … … 779 779 780 780 /********************************************************************************************************************************* 781 * UI InformationPerformanceMonitor implementation. *781 * UIPerformanceMonitor implementation. * 782 782 *********************************************************************************************************************************/ 783 783 784 UI InformationPerformanceMonitor::UIInformationPerformanceMonitor(QWidget *pParent, const CMachine &machine, const CConsole &console, const UISession *pSession)784 UIPerformanceMonitor::UIPerformanceMonitor(QWidget *pParent, const CMachine &machine, const CConsole &console, const UISession *pSession) 785 785 : QIWithRetranslateUI<QWidget>(pParent) 786 786 , m_fGuestAdditionsAvailable(false) … … 800 800 m_comGuest = m_console.GetGuest(); 801 801 m_fGuestAdditionsAvailable = guestAdditionsAvailable(6 /* minimum major version */); 802 connect(pSession, &UISession::sigAdditionsStateChange, this, &UI InformationPerformanceMonitor::sltGuestAdditionsStateChange);802 connect(pSession, &UISession::sigAdditionsStateChange, this, &UIPerformanceMonitor::sltGuestAdditionsStateChange); 803 803 804 804 prepareMetrics(); … … 808 808 } 809 809 810 UI InformationPerformanceMonitor::~UIInformationPerformanceMonitor()811 { 812 } 813 814 void UI InformationPerformanceMonitor::retranslateUi()810 UIPerformanceMonitor::~UIPerformanceMonitor() 811 { 812 } 813 814 void UIPerformanceMonitor::retranslateUi() 815 815 { 816 816 foreach (UIChart *pChart, m_charts) … … 877 877 } 878 878 879 void UI InformationPerformanceMonitor::prepareObjects()879 void UIPerformanceMonitor::prepareObjects() 880 880 { 881 881 m_pMainLayout = new QVBoxLayout(this); … … 887 887 if (m_pTimer) 888 888 { 889 connect(m_pTimer, &QTimer::timeout, this, &UI InformationPerformanceMonitor::sltTimeout);889 connect(m_pTimer, &QTimer::timeout, this, &UIPerformanceMonitor::sltTimeout); 890 890 m_pTimer->start(1000 * iPeriod); 891 891 } … … 943 943 } 944 944 945 void UI InformationPerformanceMonitor::sltTimeout()945 void UIPerformanceMonitor::sltTimeout() 946 946 { 947 947 if (m_performanceMonitor.isNull()) … … 1022 1022 1023 1023 /* static */ 1024 void UI InformationPerformanceMonitor::getNetworkLoad(CMachineDebugger &debugger, quint64 &uOutNetworkReceived, quint64 &uOutNetworkTransmitted)1024 void UIPerformanceMonitor::getNetworkLoad(CMachineDebugger &debugger, quint64 &uOutNetworkReceived, quint64 &uOutNetworkTransmitted) 1025 1025 { 1026 1026 uOutNetworkReceived = 0; … … 1039 1039 1040 1040 /* static */ 1041 void UI InformationPerformanceMonitor::getDiskLoad(CMachineDebugger &debugger, quint64 &uOutDiskWritten, quint64 &uOutDiskRead)1041 void UIPerformanceMonitor::getDiskLoad(CMachineDebugger &debugger, quint64 &uOutDiskWritten, quint64 &uOutDiskRead) 1042 1042 { 1043 1043 QVector<UIDebuggerMetricData> xmlData = getAndParseStatsFromDebugger(debugger, "/Public/Storage/*/Port*/Bytes*"); … … 1054 1054 1055 1055 /* static */ 1056 void UI InformationPerformanceMonitor::getVMMExitCount(CMachineDebugger &debugger, quint64 &uOutVMMExitCount)1056 void UIPerformanceMonitor::getVMMExitCount(CMachineDebugger &debugger, quint64 &uOutVMMExitCount) 1057 1057 { 1058 1058 QVector<UIDebuggerMetricData> xmlData = getAndParseStatsFromDebugger(debugger, "/PROF/CPU*/EM/RecordedExits"); … … 1070 1070 * @returns 1071 1071 */ 1072 void UI InformationPerformanceMonitor::sltGuestAdditionsStateChange()1072 void UIPerformanceMonitor::sltGuestAdditionsStateChange() 1073 1073 { 1074 1074 bool fGuestAdditionsAvailable = guestAdditionsAvailable(6 /* minimum major version */); … … 1079 1079 } 1080 1080 1081 void UI InformationPerformanceMonitor::prepareMetrics()1081 void UIPerformanceMonitor::prepareMetrics() 1082 1082 { 1083 1083 m_performanceMonitor = uiCommon().virtualBox().GetPerformanceCollector(); … … 1126 1126 } 1127 1127 1128 bool UI InformationPerformanceMonitor::guestAdditionsAvailable(int iMinimumMajorVersion)1128 bool UIPerformanceMonitor::guestAdditionsAvailable(int iMinimumMajorVersion) 1129 1129 { 1130 1130 if (m_comGuest.isNull()) … … 1145 1145 } 1146 1146 1147 void UI InformationPerformanceMonitor::enableDisableGuestAdditionDependedWidgets(bool fEnable)1147 void UIPerformanceMonitor::enableDisableGuestAdditionDependedWidgets(bool fEnable) 1148 1148 { 1149 1149 for (QMap<QString, UIMetric>::const_iterator iterator = m_metrics.begin(); … … 1165 1165 } 1166 1166 1167 void UI InformationPerformanceMonitor::updateCPUGraphsAndMetric(ULONG iExecutingPercentage, ULONG iOtherPercentage)1167 void UIPerformanceMonitor::updateCPUGraphsAndMetric(ULONG iExecutingPercentage, ULONG iOtherPercentage) 1168 1168 { 1169 1169 UIMetric &CPUMetric = m_metrics[m_strCPUMetricName]; … … 1190 1190 } 1191 1191 1192 void UI InformationPerformanceMonitor::updateRAMGraphsAndMetric(quint64 iTotalRAM, quint64 iFreeRAM)1192 void UIPerformanceMonitor::updateRAMGraphsAndMetric(quint64 iTotalRAM, quint64 iFreeRAM) 1193 1193 { 1194 1194 UIMetric &RAMMetric = m_metrics[m_strRAMMetricName]; … … 1210 1210 } 1211 1211 1212 void UI InformationPerformanceMonitor::updateNetworkGraphsAndMetric(quint64 iReceiveTotal, quint64 iTransmitTotal)1212 void UIPerformanceMonitor::updateNetworkGraphsAndMetric(quint64 iReceiveTotal, quint64 iTransmitTotal) 1213 1213 { 1214 1214 UIMetric &NetMetric = m_metrics[m_strNetworkMetricName]; … … 1253 1253 } 1254 1254 1255 void UI InformationPerformanceMonitor::updateDiskIOGraphsAndMetric(quint64 uDiskIOTotalWritten, quint64 uDiskIOTotalRead)1255 void UIPerformanceMonitor::updateDiskIOGraphsAndMetric(quint64 uDiskIOTotalWritten, quint64 uDiskIOTotalRead) 1256 1256 { 1257 1257 UIMetric &diskMetric = m_metrics[m_strDiskIOMetricName]; … … 1296 1296 } 1297 1297 1298 void UI InformationPerformanceMonitor::updateVMExitMetric(quint64 uTotalVMExits)1298 void UIPerformanceMonitor::updateVMExitMetric(quint64 uTotalVMExits) 1299 1299 { 1300 1300 if (uTotalVMExits <= 0) … … 1329 1329 } 1330 1330 1331 QString UI InformationPerformanceMonitor::dataColorString(const QString &strChartName, int iDataIndex)1331 QString UIPerformanceMonitor::dataColorString(const QString &strChartName, int iDataIndex) 1332 1332 { 1333 1333 if (!m_charts.contains(strChartName)) … … 1340 1340 1341 1341 /* static */ 1342 QVector<UIDebuggerMetricData> UI InformationPerformanceMonitor::getAndParseStatsFromDebugger(CMachineDebugger &debugger, const QString &strQuery)1342 QVector<UIDebuggerMetricData> UIPerformanceMonitor::getAndParseStatsFromDebugger(CMachineDebugger &debugger, const QString &strQuery) 1343 1343 { 1344 1344 QVector<UIDebuggerMetricData> xmlData; … … 1369 1369 return xmlData; 1370 1370 } 1371 #include "UI InformationPerformanceMonitor.moc"1371 #include "UIPerformanceMonitor.moc" -
trunk/src/VBox/Frontends/VirtualBox/src/monitor/performance/UIPerformanceMonitor.h
r83344 r83345 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI InformationPerformanceMonitor class declaration.3 * VBox Qt GUI - UIPerformanceMonitor class declaration. 4 4 */ 5 5 … … 16 16 */ 17 17 18 #ifndef FEQT_INCLUDED_SRC_ runtime_information_UIInformationPerformanceMonitor_h19 #define FEQT_INCLUDED_SRC_ runtime_information_UIInformationPerformanceMonitor_h18 #ifndef FEQT_INCLUDED_SRC_monitor_performance_UIPerformanceMonitor_h 19 #define FEQT_INCLUDED_SRC_monitor_performance_UIPerformanceMonitor_h 20 20 #ifndef RT_WITHOUT_PRAGMA_ONCE 21 21 # pragma once … … 106 106 }; 107 107 108 /** UI InformationPerformanceMonitor class displays some high level performance metric of the guest system.108 /** UIPerformanceMonitor class displays some high level performance metric of the guest system. 109 109 * The values are read in certain periods and cached in the GUI side. Currently we draw some line charts 110 110 * and pie charts (where applicable) alongside with some text. IPerformanceCollector and IMachineDebugger are 111 111 * two sources of the performance metrics. Unfortunately these two have very distinct APIs resulting a bit too much 112 112 * special casing etc.*/ 113 class UI InformationPerformanceMonitor : public QIWithRetranslateUI<QWidget>113 class UIPerformanceMonitor : public QIWithRetranslateUI<QWidget> 114 114 { 115 115 Q_OBJECT; … … 120 120 * @param machine is machine reference. 121 121 * @param console is machine console reference. */ 122 UI InformationPerformanceMonitor(QWidget *pParent, const CMachine &machine, const CConsole &console, const UISession *pSession);123 ~UI InformationPerformanceMonitor();122 UIPerformanceMonitor(QWidget *pParent, const CMachine &machine, const CConsole &console, const UISession *pSession); 123 ~UIPerformanceMonitor(); 124 124 125 125 /** @name Static utlity methods that query and parse IMachineDebugger outputs for specific metrix types. … … 227 227 }; 228 228 229 #endif /* !FEQT_INCLUDED_SRC_ runtime_information_UIInformationPerformanceMonitor_h */229 #endif /* !FEQT_INCLUDED_SRC_monitor_performance_UIPerformanceMonitor_h */ -
trunk/src/VBox/Frontends/VirtualBox/src/monitor/resource/UIResourceMonitor.cpp
r83334 r83345 32 32 #include "UIExtraDataManager.h" 33 33 #include "UIIconPool.h" 34 #include "UI InformationPerformanceMonitor.h"34 #include "UIPerformanceMonitor.h" 35 35 #include "UIResourceMonitor.h" 36 36 #include "UIMessageCenter.h" -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp
r82968 r83345 35 35 #include "VBoxUtils.h" 36 36 #include "UIInformationConfiguration.h" 37 #include "UI InformationPerformanceMonitor.h"37 #include "UIPerformanceMonitor.h" 38 38 #include "UIInformationRuntime.h" 39 39 #include "UIGuestProcessControlWidget.h" … … 199 199 200 200 /* Create Performance Monitor tab: */ 201 UI InformationPerformanceMonitor *pPerformanceMonitorWidget =202 new UI InformationPerformanceMonitor(this, m_pMachineWindow->machine(), m_pMachineWindow->console(), m_pMachineWindow->uisession());201 UIPerformanceMonitor *pPerformanceMonitorWidget = 202 new UIPerformanceMonitor(this, m_pMachineWindow->machine(), m_pMachineWindow->console(), m_pMachineWindow->uisession()); 203 203 if (pPerformanceMonitorWidget) 204 204 {
Note:
See TracChangeset
for help on using the changeset viewer.