tensorflow/core/platform/statusor_test.cc
// Measure the time to use the StatusOr<T*> factory, evaluate the result,
// and invoke the trivial function.
Measure the time to use the StatusOr factory, evaluate the result,
and invoke the trivial function.
Measure the time to use the StatusOr factory evaluate the result and invoke the trivial function .
void BM_StatusOrFactoryFail(::testing::benchmark::State& state) {
  BenchmarkFactory<BenchmarkType> factory;
  for (auto s : state) {
    StatusOr<BenchmarkType*> result = factory.StatusOrFactoryFail();
    if (result.ok()) {
      result.ValueOrDie()->DoWork();
    }
  }
}
void BM_StatusOrFactoryFail ( :: testing :: benchmark :: State & state ) { BenchmarkFactory < BenchmarkType > factory ; for ( auto s : state ) { StatusOr < BenchmarkType * > result = factory . StatusOrFactoryFail ( ) ; if ( result . ok ( ) ) { result . ValueOrDie ( ) -> DoWork ( ) ; } } }
Measure the time to use the StatusOr<T*> factory, evaluate the result,
and invoke the trivial function.
Measure the time to use the StatusOr<T * > factory evaluate the result and invoke the trivial function .