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

Function ValidateLapTime

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

Source from the content-addressed store, hash-verified

1230}
1231
1232void ValidateLapTime(TimerCounterTest* timer, int64_t expected_value) {
1233 int64_t stopwatch_value = timer->csw_.LapTime();
1234 EXPECT_GE(stopwatch_value, expected_value - TimerCounterTest::MAX_TIMER_ERROR_NS);
1235 EXPECT_LE(stopwatch_value, expected_value + TimerCounterTest::MAX_TIMER_ERROR_NS);
1236
1237 int64_t timer_value = timer->timercounter_.LapTime();
1238 EXPECT_GE(timer_value, expected_value - TimerCounterTest::MAX_TIMER_ERROR_NS);
1239 EXPECT_LE(timer_value, expected_value + TimerCounterTest::MAX_TIMER_ERROR_NS);
1240}
1241
1242TEST(TimerCounterTest, CountersTestOneThread) {
1243 TimerCounterTest tester;

Callers 1

TESTFunction · 0.85

Calls 1

LapTimeMethod · 0.45

Tested by

no test coverage detected