MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/lite/tools/benchmark/benchmark_utils_test.cc:28–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace {
27
28TEST(BenchmarkHelpersTest, SleepForNegativeSeconds) {
29 const auto start_ts = tflite::profiling::time::NowMicros();
30 // The following should return immediately.
31 util::SleepForSeconds(-5.0);
32 const auto end_ts = tflite::profiling::time::NowMicros();
33
34 // As we don't have a mocked clock, we simply expect <1 sec has elapsed, which
35 // is admittedly not quite accurate.
36 EXPECT_LT(end_ts - start_ts, 1000000);
37}
38
39TEST(BenchmarkHelpersTest, SleepForSomeSeconds) {
40 const auto start_ts = tflite::profiling::time::NowMicros();

Callers

nothing calls this directly

Calls 4

SleepForSecondsFunction · 0.85
SplitAndParseFunction · 0.85
NowMicrosFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected