Measure the time taken to call into the factory, return the value, determine that it is OK, and invoke a trivial function.
| 531 | // Measure the time taken to call into the factory, return the value, |
| 532 | // determine that it is OK, and invoke a trivial function. |
| 533 | void BM_TrivialFactory(int iters) { |
| 534 | tensorflow::testing::StopTiming(); |
| 535 | BenchmarkFactory<BenchmarkType> factory; |
| 536 | tensorflow::testing::StartTiming(); |
| 537 | for (int i = 0; i != iters; ++i) { |
| 538 | BenchmarkType* result = factory.TrivialFactory(); |
| 539 | if (result != nullptr) { |
| 540 | result->DoWork(); |
| 541 | } |
| 542 | } |
| 543 | } |
| 544 | BENCHMARK(BM_TrivialFactory); |
| 545 | |
| 546 | // Measure the time taken to call into the factory, providing an |
nothing calls this directly
no test coverage detected