Changeset 48412 in vbox for trunk/src/VBox/Runtime/testcase
- Timestamp:
- Sep 10, 2013 2:47:18 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstRTR0Timer.cpp
r48411 r48412 894 894 * Process the result. 895 895 */ 896 int32_t cNsDiv = cNsInterval / 4; /* 25% */ 897 uint32_t cTotal = 0; 898 uint32_t cLow = 0; 899 uint32_t cHigh = 0; 900 for (uint32_t iCpu = 0; iCpu < RTCPUSET_MAX_CPUS; iCpu++) 896 int32_t cNsLow = cNsInterval / 4 * 3; /* 75% */ 897 int32_t cNsHigh = cNsInterval / 4 * 5; /* 125% */ 898 uint32_t cTotal = 0; 899 uint32_t cLow = 0; 900 uint32_t cHigh = 0; 901 for (uint32_t iCpu = 0; iCpu < RT_ELEMENTS(g_aOmniLatency); iCpu++) 901 902 { 902 903 uint32_t cSamples = g_aOmniLatency[iCpu].cSamples; … … 908 909 int64_t cNsDelta = g_aOmniLatency[iCpu].aSamples[iSample - 1].uNanoTs 909 910 - g_aOmniLatency[iCpu].aSamples[iSample].uNanoTs; 910 if (cNsDelta < 0 && cNsDelta < -cNsDiv)911 if (cNsDelta < cNsLow) 911 912 cLow++; 912 else if (cNsDelta > 0 && cNsDelta > cNsDiv)913 else if (cNsDelta > cNsHigh) 913 914 cHigh++; 914 915 } 915 916 } 916 917 } 917 918 RTR0TestR0Info("25%: %u; -25%: %u; total: %u", cHigh, cLow, cTotal); 918 RTR0TestR0Info("125%%: %u; 75%%: %u; total: %u", cHigh, cLow, cTotal); 919 919 RTR0TESTR0_CHECK_RC(RTTimerDestroy(pTimer), VINF_SUCCESS); 920 920 break;
Note:
See TracChangeset
for help on using the changeset viewer.