- Timestamp:
- Jan 16, 2024 3:37:33 PM (13 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.cpp
r102901 r102903 979 979 *********************************************************************************************************************************/ 980 980 981 UIMetric::UIMetric(const QString &strName, const QString &strUnit, int iMaximumQueueSize) 982 : m_strName(strName) 983 , m_strUnit(strUnit) 981 UIMetric::UIMetric(const QString &strUnit, int iMaximumQueueSize) 982 : m_strUnit(strUnit) 984 983 , m_iMaximum(0) 985 984 , m_fRequiresGuestAdditions(false) … … 1000 999 } 1001 1000 1002 const QString &UIMetric::name() const1003 {1004 return m_strName;1005 }1006 1007 1001 void UIMetric::setMaximum(quint64 iMaximum) 1008 1002 { … … 1153 1147 void UIMetric::toFile(QTextStream &stream) const 1154 1148 { 1155 stream << "Metric Name: " << m_strName << "\n";1156 1149 stream << "Unit: " << m_strUnit << "\n"; 1157 1150 stream << "Maximum: " << m_iMaximum << "\n"; … … 1652 1645 if (strName.contains("RAM", Qt::CaseInsensitive) && strName.contains("Free", Qt::CaseInsensitive)) 1653 1646 { 1654 UIMetric ramMetric( "",metrics[i].GetUnit(), m_iMaximumQueueSize);1647 UIMetric ramMetric(metrics[i].GetUnit(), m_iMaximumQueueSize); 1655 1648 ramMetric.setDataSeriesName(0, "Free"); 1656 1649 ramMetric.setDataSeriesName(1, "Used"); … … 1663 1656 1664 1657 /* CPU Metric: */ 1665 UIMetric cpuMetric(" ", "%", m_iMaximumQueueSize);1658 UIMetric cpuMetric("%", m_iMaximumQueueSize); 1666 1659 cpuMetric.setDataSeriesName(0, "Guest Load"); 1667 1660 cpuMetric.setDataSeriesName(1, "VMM Load"); … … 1669 1662 1670 1663 /* Network metric: */ 1671 UIMetric networkMetric(" ", "B", m_iMaximumQueueSize);1664 UIMetric networkMetric("B", m_iMaximumQueueSize); 1672 1665 networkMetric.setDataSeriesName(0, "Receive Rate"); 1673 1666 networkMetric.setDataSeriesName(1, "Transmit Rate"); … … 1676 1669 1677 1670 /* Disk IO metric */ 1678 UIMetric diskIOMetric(" ", "B", m_iMaximumQueueSize);1671 UIMetric diskIOMetric("B", m_iMaximumQueueSize); 1679 1672 diskIOMetric.setDataSeriesName(0, "Write Rate"); 1680 1673 diskIOMetric.setDataSeriesName(1, "Read Rate"); … … 1683 1676 1684 1677 /* VM exits metric */ 1685 UIMetric VMExitsMetric(" ", "times", m_iMaximumQueueSize);1678 UIMetric VMExitsMetric("times", m_iMaximumQueueSize); 1686 1679 VMExitsMetric.setAutoUpdateMaximum(true); 1687 1680 m_metrics.insert(Metric_Type_VM_Exits, VMExitsMetric); … … 2381 2374 if (m_iTotalRAM != 0) 2382 2375 { 2383 UIMetric ramMetric(" ", "kb", m_iMaximumQueueSize);2376 UIMetric ramMetric("kb", m_iMaximumQueueSize); 2384 2377 ramMetric.setDataSeriesName(0, "Used"); 2385 2378 m_metrics.insert(Metric_Type_RAM, ramMetric); … … 2387 2380 2388 2381 /* CPU Metric: */ 2389 UIMetric cpuMetric(" ", "%", m_iMaximumQueueSize);2382 UIMetric cpuMetric("%", m_iMaximumQueueSize); 2390 2383 cpuMetric.setDataSeriesName(0, "CPU Utilization"); 2391 2384 m_metrics.insert(Metric_Type_CPU, cpuMetric); 2392 2385 2393 2386 /* Network in metric: */ 2394 UIMetric networkInMetric(" ", "B", m_iMaximumQueueSize);2387 UIMetric networkInMetric("B", m_iMaximumQueueSize); 2395 2388 networkInMetric.setDataSeriesName(0, "Receive Rate"); 2396 2389 networkInMetric.setAutoUpdateMaximum(true); … … 2398 2391 2399 2392 /* Network out metric: */ 2400 UIMetric networkOutMetric(" ", "B", m_iMaximumQueueSize);2393 UIMetric networkOutMetric("B", m_iMaximumQueueSize); 2401 2394 networkOutMetric.setDataSeriesName(0, "Transmit Rate"); 2402 2395 networkOutMetric.setAutoUpdateMaximum(true); … … 2404 2397 2405 2398 /* Disk write metric */ 2406 UIMetric diskIOWrittenMetric(" ", "B", m_iMaximumQueueSize);2399 UIMetric diskIOWrittenMetric("B", m_iMaximumQueueSize); 2407 2400 diskIOWrittenMetric.setDataSeriesName(0, "Write Rate"); 2408 2401 diskIOWrittenMetric.setAutoUpdateMaximum(true); … … 2410 2403 2411 2404 /* Disk read metric */ 2412 UIMetric diskIOReadMetric(" ", "B", m_iMaximumQueueSize);2405 UIMetric diskIOReadMetric("B", m_iMaximumQueueSize); 2413 2406 diskIOReadMetric.setDataSeriesName(0, "Read Rate"); 2414 2407 diskIOReadMetric.setAutoUpdateMaximum(true); -
trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.h
r102901 r102903 85 85 public: 86 86 87 UIMetric(const QString &str Name, const QString &strUnit, int iMaximumQueueSize);87 UIMetric(const QString &strUnit, int iMaximumQueueSize); 88 88 UIMetric(); 89 const QString &name() const;90 89 91 90 void setMaximum(quint64 iMaximum); … … 126 125 void updateMax(); 127 126 128 QString m_strName;129 127 QString m_strUnit; 130 128 QString m_strDataSeriesName[DATA_SERIES_SIZE];
Note:
See TracChangeset
for help on using the changeset viewer.