Changeset 102810 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jan 10, 2024 8:41:20 AM (11 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
r102774 r102810 758 758 int iDataIndex = qMin(labels->size() - 1, iTimeIndex - (m_iMaximumQueueSize - maxDataSize())); 759 759 if (iDataIndex >= 0) 760 strAxisText = UIVMActivityMonitorCloud::formatCloudTimeStamp(labels->at(iDataIndex));760 strAxisText = labels->at(iDataIndex); 761 761 } 762 762 else … … 2060 2060 } 2061 2061 2062 void UIVMActivityMonitorCloud::sltMetricDataReceived(KMetricType enmMetricType, QVector<QString> data, QVector<QString> timeStamps) 2062 void UIVMActivityMonitorCloud::sltMetricDataReceived(KMetricType enmMetricType, 2063 const QVector<QString> &data, const QVector<QString> &timeStamps) 2063 2064 { 2064 2065 if (data.size() != timeStamps.size()) 2065 2066 return; 2067 QVector<QString> newTimeStamps; 2068 foreach (const QString &strTimeStamp, timeStamps) 2069 { 2070 if (strTimeStamp.isEmpty()) 2071 continue; 2072 QDateTime dateTime = QDateTime::fromString(strTimeStamp, Qt::RFC2822Date); 2073 if (!dateTime.isValid()) 2074 continue; 2075 newTimeStamps << dateTime.time().toString("hh:mm"); 2076 } 2077 2066 2078 for (int i = 0; i < data.size(); ++i) 2067 2079 { … … 2069 2081 { 2070 2082 float fValue = data[i].toFloat(); 2071 updateCPUChart((ULONG) fValue, timeStamps[i]);2083 updateCPUChart((ULONG) fValue, newTimeStamps[i]); 2072 2084 } 2073 2085 else if (enmMetricType == KMetricType_NetworksBytesOut) 2074 cacheNetworkTransmit( timeStamps[i], (int)data[i].toFloat());2086 cacheNetworkTransmit(newTimeStamps[i], (int)data[i].toFloat()); 2075 2087 else if (enmMetricType == KMetricType_NetworksBytesIn) 2076 cacheNetworkReceive( timeStamps[i], (int)data[i].toFloat());2088 cacheNetworkReceive(newTimeStamps[i], (int)data[i].toFloat()); 2077 2089 else if (enmMetricType == KMetricType_DiskBytesRead) 2078 cacheDiskRead( timeStamps[i], (int)data[i].toFloat());2090 cacheDiskRead(newTimeStamps[i], (int)data[i].toFloat()); 2079 2091 else if (enmMetricType == KMetricType_DiskBytesWritten) 2080 cacheDiskWrite( timeStamps[i], (int)data[i].toFloat());2092 cacheDiskWrite(newTimeStamps[i], (int)data[i].toFloat()); 2081 2093 else if (enmMetricType == KMetricType_MemoryUtilization) 2082 2094 { … … 2085 2097 /* calculate used RAM amount in kb: */ 2086 2098 quint64 iUsedRAM = data[i].toFloat() * (m_iTotalRAM / 100.f); 2087 updateRAMChart(iUsedRAM, timeStamps[i]);2099 updateRAMChart(iUsedRAM, newTimeStamps[i]); 2088 2100 } 2089 2101 } -
trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.h
r102774 r102810 325 325 326 326 void sltMetricNameListingComplete(QVector<QString> metricNameList); 327 void sltMetricDataReceived(KMetricType enmMetricType, QVector<QString> data, QVector<QString> timeStamps); 327 void sltMetricDataReceived(KMetricType enmMetricType, 328 const QVector<QString> &data, const QVector<QString> &timeStamps); 328 329 void sltMachineStateUpdateTimeout(); 329 330
Note:
See TracChangeset
for help on using the changeset viewer.