VirtualBox

Changeset 93694 in vbox for trunk/src/VBox/Runtime/testcase


Ignore:
Timestamp:
Feb 11, 2022 12:06:18 PM (3 years ago)
Author:
vboxsync
Message:

IPRT/tstRTAvl: report some performance values at the end of the hardAvlRangTreeGCPhys test. bugref:10093

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstRTAvl.cpp

    r93693 r93694  
    11071107typedef struct TESTNODE
    11081108{
    1109     RTGCPHYS Key, KeyLast;
    1110     uint32_t idxLeft, idxRight;
     1109    RTGCPHYS Key;
     1110    RTGCPHYS KeyLast;
     1111    uint32_t idxLeft;
     1112    uint32_t idxRight;
    11111113    uint8_t  cHeight;
    11121114} MYTESTNODE;
     
    15311533            break;
    15321534    }
     1535    uint64_t cNsElapsed = RTTimeNanoTS() - nsStart;
    15331536    RTTestIPrintf(RTTESTLVL_ALWAYS, "Performed %'u operations and enumerated %'RU64 nodes in %'RU64 ns\n",
    1534                   i, cItemsEnumed, RTTimeNanoTS() - nsStart);
     1537                  i, cItemsEnumed, cNsElapsed);
     1538
     1539    RTTestIValue("Operations rate",        (uint64_t)i * RT_NS_1SEC / RT_MAX(cNsElapsed, 1), RTTESTUNIT_OCCURRENCES_PER_SEC);
     1540    RTTestIValue("Nodes enumeration rate",
     1541                 (uint64_t)((double)cItemsEnumed * (double)RT_NS_1SEC / (double)RT_MAX(cNsElapsed, 1)),
     1542                 RTTESTUNIT_OCCURRENCES_PER_SEC);
    15351543
    15361544    return 0;
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