VirtualBox

Changeset 10870 in vbox


Ignore:
Timestamp:
Jul 24, 2008 7:32:11 PM (16 years ago)
Author:
vboxsync
Message:

PerfAPI: Min/max value fix for CPU Load counters.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

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

    r10868 r10870  
    121121        const char *getUnit() { return "%"; };
    122122        unsigned long getMinValue() { return 0; };
    123         unsigned long getMaxValue() { return 100000000; };
     123        unsigned long getMaxValue() { return PM_CPU_LOAD_MULTIPLIER; };
    124124
    125125    protected:
     
    184184        const char *getUnit() { return "%"; };
    185185        unsigned long getMinValue() { return 0; };
    186         unsigned long getMaxValue() { return 100000000; };
     186        unsigned long getMaxValue() { return PM_CPU_LOAD_MULTIPLIER; };
    187187    protected:
    188188        RTPROCESS  mProcess;
  • trunk/src/VBox/Main/testcase/tstAPI.cpp

    r10868 r10870  
    10571057        Bstr metricUnit(metricUnitBSTR);
    10581058        Bstr metricName(retNames[i]);
    1059         printf("obj(%p) %ls", anObject[0], metricName.raw());
     1059        LONG minVal, maxVal;
     1060        CHECK_RC_BREAK (metricInfo[0]->COMGETTER(MinimumValue) (&minVal));
     1061        CHECK_RC_BREAK (metricInfo[0]->COMGETTER(MaximumValue) (&maxVal));
     1062        printf("obj(%p) %ls (min=%lu max=%lu)", anObject[0], metricName.raw(), minVal, maxVal);
    10601063        for (unsigned j = 0; j < retLengths[i]; j++)
    10611064        {
Note: See TracChangeset for help on using the changeset viewer.

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