MCPcopy Create free account
hub / github.com/apache/impala / ValidateTimerValue

Function ValidateTimerValue

be/src/util/runtime-profile-test.cc:1221–1230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1219};
1220
1221void ValidateTimerValue(const TimerCounterTest& timer, int64_t start) {
1222 int64_t expected_value = MonotonicStopWatch::Now() - start;
1223 int64_t stopwatch_value = timer.csw_.TotalRunningTime();
1224 EXPECT_GE(stopwatch_value, expected_value - TimerCounterTest::MAX_TIMER_ERROR_NS);
1225 EXPECT_LE(stopwatch_value, expected_value + TimerCounterTest::MAX_TIMER_ERROR_NS);
1226
1227 int64_t timer_value = timer.timercounter_.value();
1228 EXPECT_GE(timer_value, expected_value - TimerCounterTest::MAX_TIMER_ERROR_NS);
1229 EXPECT_LE(timer_value, expected_value + TimerCounterTest::MAX_TIMER_ERROR_NS);
1230}
1231
1232void ValidateLapTime(TimerCounterTest* timer, int64_t expected_value) {
1233 int64_t stopwatch_value = timer->csw_.LapTime();

Callers 1

TESTFunction · 0.85

Calls 2

TotalRunningTimeMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected