Changeset 35964 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- Feb 14, 2011 5:06:48 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 70028
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/Performance.h
r30847 r35964 343 343 { 344 344 public: 345 HostRamUsage(CollectorHAL *hal, ComPtr<IUnknown> object, SubMetric *total, SubMetric *used, SubMetric *available, SubMetric *allocVMM, SubMetric *freeVMM, SubMetric *balloonVMM, SubMetric *sharedVMM)346 : BaseMetric(hal, "RAM/Usage", object), mTotal(total), mUsed(used), mAvailable(available) , mAllocVMM(allocVMM), mFreeVMM(freeVMM), mBalloonVMM(balloonVMM), mSharedVMM(sharedVMM){};347 ~HostRamUsage() { delete mTotal; delete mUsed; delete mAvailable; delete mAllocVMM; delete mFreeVMM; delete mBalloonVMM; delete mSharedVMM;};345 HostRamUsage(CollectorHAL *hal, ComPtr<IUnknown> object, SubMetric *total, SubMetric *used, SubMetric *available) 346 : BaseMetric(hal, "RAM/Usage", object), mTotal(total), mUsed(used), mAvailable(available) {}; 347 ~HostRamUsage() { delete mTotal; delete mUsed; delete mAvailable; }; 348 348 349 349 void init(ULONG period, ULONG length); … … 358 358 SubMetric *mUsed; 359 359 SubMetric *mAvailable; 360 }; 361 362 class HostRamVmm : public BaseMetric 363 { 364 public: 365 HostRamVmm(CollectorHAL *hal, ComPtr<IUnknown> object, SubMetric *allocVMM, SubMetric *freeVMM, SubMetric *balloonVMM, SubMetric *sharedVMM) 366 : BaseMetric(hal, "RAM/VMM", object), mAllocVMM(allocVMM), mFreeVMM(freeVMM), mBalloonVMM(balloonVMM), mSharedVMM(sharedVMM) {}; 367 ~HostRamVmm() { delete mAllocVMM; delete mFreeVMM; delete mBalloonVMM; delete mSharedVMM; }; 368 369 void init(ULONG period, ULONG length); 370 void preCollect(CollectorHints& hints, uint64_t iTick); 371 void collect(); 372 const char *getUnit() { return "kB"; }; 373 ULONG getMinValue() { return 0; }; 374 ULONG getMaxValue() { return INT32_MAX; }; 375 ULONG getScale() { return 1; } 376 private: 360 377 SubMetric *mAllocVMM; 361 378 SubMetric *mFreeVMM;
Note:
See TracChangeset
for help on using the changeset viewer.