VirtualBox

Changeset 35964 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Feb 14, 2011 5:06:48 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70028
Message:

Metrics: Introduced RAM/VMM base metric

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/Performance.h

    r30847 r35964  
    343343    {
    344344    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; };
    348348
    349349        void init(ULONG period, ULONG length);
     
    358358        SubMetric *mUsed;
    359359        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:
    360377        SubMetric *mAllocVMM;
    361378        SubMetric *mFreeVMM;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette