Changeset 11583 in vbox for trunk/src/VBox/Main
- Timestamp:
- Aug 22, 2008 7:05:15 PM (16 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HostImpl.cpp
r11481 r11583 2736 2736 pm::MetricFactory *metricFactory = aCollector->getMetricFactory(); 2737 2737 /* Create sub metrics */ 2738 pm::SubMetric *cpuLoadUser = new pm::SubMetric ("CPU/Load/User"); 2739 pm::SubMetric *cpuLoadKernel = new pm::SubMetric ("CPU/Load/Kernel"); 2740 pm::SubMetric *cpuLoadIdle = new pm::SubMetric ("CPU/Load/Idle"); 2741 pm::SubMetric *cpuMhzSM = new pm::SubMetric ("CPU/MHz"); 2742 pm::SubMetric *ramUsageTotal = new pm::SubMetric ("RAM/Usage/Total"); 2743 pm::SubMetric *ramUsageUsed = new pm::SubMetric ("RAM/Usage/Used"); 2744 pm::SubMetric *ramUsageFree = new pm::SubMetric ("RAM/Usage/Free"); 2738 pm::SubMetric *cpuLoadUser = new pm::SubMetric ("CPU/Load/User", 2739 "Percentage of processor time spent in user mode."); 2740 pm::SubMetric *cpuLoadKernel = new pm::SubMetric ("CPU/Load/Kernel", 2741 "Percentage of processor time spent in kernel mode."); 2742 pm::SubMetric *cpuLoadIdle = new pm::SubMetric ("CPU/Load/Idle", 2743 "Percentage of processor time spent idling."); 2744 pm::SubMetric *cpuMhzSM = new pm::SubMetric ("CPU/MHz", 2745 "Average of current frequency of all processors."); 2746 pm::SubMetric *ramUsageTotal = new pm::SubMetric ("RAM/Usage/Total", 2747 "Total physical memory installed."); 2748 pm::SubMetric *ramUsageUsed = new pm::SubMetric ("RAM/Usage/Used", 2749 "Physical memory currently occupied."); 2750 pm::SubMetric *ramUsageFree = new pm::SubMetric ("RAM/Usage/Free", 2751 "Physical memory currently available to applications."); 2745 2752 /* Create and register base metrics */ 2746 2753 IUnknown *objptr; -
trunk/src/VBox/Main/MachineImpl.cpp
r11357 r11583 7583 7583 pm::MetricFactory *metricFactory = aCollector->getMetricFactory(); 7584 7584 /* Create sub metrics */ 7585 pm::SubMetric *cpuLoadUser = new pm::SubMetric ("CPU/Load/User"); 7586 pm::SubMetric *cpuLoadKernel = new pm::SubMetric ("CPU/Load/Kernel"); 7587 pm::SubMetric *ramUsageUsed = new pm::SubMetric ("RAM/Usage/Used"); 7585 pm::SubMetric *cpuLoadUser = new pm::SubMetric ("CPU/Load/User", 7586 "Percentage of processor time spent in user mode by VM process."); 7587 pm::SubMetric *cpuLoadKernel = new pm::SubMetric ("CPU/Load/Kernel", 7588 "Percentage of processor time spent in kernel mode by VM process."); 7589 pm::SubMetric *ramUsageUsed = new pm::SubMetric ("RAM/Usage/Used", 7590 "Size of resident portion of VM process in memory."); 7588 7591 /* Create and register base metrics */ 7589 7592 IUnknown *objptr; -
trunk/src/VBox/Main/Performance.cpp
r11571 r11583 26 26 * 27 27 * 1) Detection of erroneous metric names 28 * 2) Wildcards in metric names29 * 3) Darwin backend30 * 4) [OS/2 backend]31 28 */ 32 29 -
trunk/src/VBox/Main/PerformanceImpl.cpp
r11481 r11583 510 510 HRESULT PerformanceMetric::init (pm::Metric *aMetric) 511 511 { 512 m.name = aMetric->getName(); 513 m.object = aMetric->getObject(); 514 m.period = aMetric->getPeriod(); 515 m.count = aMetric->getLength(); 516 m.unit = aMetric->getUnit(); 517 m.min = aMetric->getMinValue(); 518 m.max = aMetric->getMaxValue(); 512 m.name = aMetric->getName(); 513 m.object = aMetric->getObject(); 514 m.description = aMetric->getDescription(); 515 m.period = aMetric->getPeriod(); 516 m.count = aMetric->getLength(); 517 m.unit = aMetric->getUnit(); 518 m.min = aMetric->getMinValue(); 519 m.max = aMetric->getMaxValue(); 519 520 return S_OK; 520 521 } … … 539 540 } 540 541 542 STDMETHODIMP PerformanceMetric::COMGETTER(Description) (BSTR *aDescription) 543 { 544 m.description.cloneTo (aDescription); 545 return S_OK; 546 } 547 541 548 STDMETHODIMP PerformanceMetric::COMGETTER(Period) (ULONG *aPeriod) 542 549 { -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r11441 r11583 10320 10320 <interface 10321 10321 name="IPerformanceMetric" extends="$unknown" 10322 uuid=" 50831d4c-ed55-4221-836c-87b487d3b44a" wsmap="managed"10322 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed" 10323 10323 > 10324 10324 <desc> … … 10336 10336 <desc> 10337 10337 Object this metric belongs to. 10338 </desc> 10339 </attribute> 10340 10341 <attribute name="description" type="wstring" readonly="yes"> 10342 <desc> 10343 Textual description of the metric. 10338 10344 </desc> 10339 10345 </attribute> -
trunk/src/VBox/Main/include/Performance.h
r11571 r11583 53 53 { 54 54 public: 55 SubMetric(const char *name )56 : mName(name) {};55 SubMetric(const char *name, const char *description) 56 : mName(name), mDescription(description) {}; 57 57 void query(ULONG *data); 58 58 const char *getName() { return mName; }; 59 const char *getDescription() { return mDescription; }; 59 60 private: 60 61 const char *mName; 62 const char *mDescription; 61 63 }; 62 64 … … 271 273 const char *getName() { return mName.c_str(); }; 272 274 ComPtr<IUnknown> getObject() { return mBaseMetric->getObject(); }; 275 const char *getDescription() 276 { return mAggregate ? "" : mSubMetric->getDescription(); }; 273 277 const char *getUnit() { return mBaseMetric->getUnit(); }; 274 278 ULONG getMinValue() { return mBaseMetric->getMinValue(); }; 275 279 ULONG getMaxValue() { return mBaseMetric->getMaxValue(); }; 276 280 ULONG getPeriod() { return mBaseMetric->getPeriod(); }; 277 ULONG getLength() { return mAggregate ? 1 : mBaseMetric->getLength(); }; 281 ULONG getLength() 282 { return mAggregate ? 1 : mBaseMetric->getLength(); }; 278 283 void query(ULONG **data, ULONG *count); 279 284 -
trunk/src/VBox/Main/include/PerformanceImpl.h
r11321 r11583 73 73 STDMETHOD(COMGETTER(MetricName)) (BSTR *aMetricName); 74 74 STDMETHOD(COMGETTER(Object)) (IUnknown **anObject); 75 STDMETHOD(COMGETTER(Description)) (BSTR *aDescription); 75 76 STDMETHOD(COMGETTER(Period)) (ULONG *aPeriod); 76 77 STDMETHOD(COMGETTER(Count)) (ULONG *aCount); … … 95 96 Bstr name; 96 97 ComPtr<IUnknown> object; 98 Bstr description; 97 99 ULONG period; 98 100 ULONG count;
Note:
See TracChangeset
for help on using the changeset viewer.