VirtualBox

Changeset 53357 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 20, 2014 11:56:14 AM (10 years ago)
Author:
vboxsync
Message:

tstGIP-2: use dedicated sample counter for overall deviation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/testcase/tstGIP-2.cpp

    r53356 r53357  
    6464    uint64_t uCpuHzRef = 0;
    6565    uint64_t uCpuHzOverallDeviation = 0;
     66    int32_t cCpuHzOverallDevCnt = 0;
    6667    RTGETOPTUNION ValueUnion;
    6768    RTGETOPTSTATE GetState;
     
    144145                            {
    145146                                uCpuHzOverallDeviation += uCpuHzDeviation;
     147                                cCpuHzOverallDevCnt++;
    146148                                uint32_t uPct = (uint32_t)(uCpuHzDeviation * 100000 / uCpuHzRef + 5);
    147149                                RTStrPrintf(szCpuHzDeviation, sizeof(szCpuHzDeviation), "%10RI64%3d.%02d%%  ",
     
    219221            if (uCpuHzRef)
    220222            {
    221                 uint32_t uPct = (uint32_t)(uCpuHzOverallDeviation * 100000 / cIterations / g_pSUPGlobalInfoPage->cCpus / uCpuHzRef + 5);
     223                uint32_t uPct = (uint32_t)(uCpuHzOverallDeviation * 100000 / cCpuHzOverallDevCnt / uCpuHzRef + 5);
    222224                RTPrintf("tstGIP-2: Overall CpuHz deviation: %d.%02d%%\n", uPct / 1000, (uPct % 1000) / 10);
    223225            }
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