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_StatusOrFactory(::testing::benchmark::State& state) {
  BenchmarkFactory<BenchmarkType> factory;
  for (auto s : state) {
    StatusOr<BenchmarkType*> result = factory.StatusOrFactory();
    if (result.ok()) {
      result.ValueOrDie()->DoWork();
    }
  }
}
void BM_StatusOrFactory ( :: testing :: benchmark :: State & state ) { BenchmarkFactory < BenchmarkType > factory ; for ( auto s : state ) { StatusOr < BenchmarkType * > result = factory . StatusOrFactory ( ) ; 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 .