Measure the time taken to call into the factory, providing an out-param for the result, evaluating the status result and the result pointer, and invoking the trivial function.
| 547 | // out-param for the result, evaluating the status result and the |
| 548 | // result pointer, and invoking the trivial function. |
| 549 | void BM_ArgumentFactory(int iters) { |
| 550 | tensorflow::testing::StopTiming(); |
| 551 | BenchmarkFactory<BenchmarkType> factory; |
| 552 | tensorflow::testing::StartTiming(); |
| 553 | for (int i = 0; i != iters; ++i) { |
| 554 | BenchmarkType* result = nullptr; |
| 555 | Status status = factory.ArgumentFactory(&result); |
| 556 | if (status.ok() && result != nullptr) { |
| 557 | result->DoWork(); |
| 558 | } |
| 559 | } |
| 560 | } |
| 561 | BENCHMARK(BM_ArgumentFactory); |
| 562 | |
| 563 | // Measure the time to use the StatusOr<T*> factory, evaluate the result, |
nothing calls this directly
no test coverage detected