tensorflow/core/profiler/utils/step_intersection.cc
// Returns the timespan across all steps in the given step_db.
Returns the timespan across all steps in the given step_db.
Returns the timespan across all steps in the given step_db .
Timespan AllStepsTimespan(const StepDatabaseResult& step_db) {
  uint64 min_ps = kuint64max;
  uint64 max_ps = 0;
  for (const auto& step : step_db.step_sequence()) {
    Timespan timespan = StepTimespan(step);
    uint64 begin_ps = timespan.begin_ps();
    uint64 end_ps = timespan.end_ps();
    min_ps = std::min(min_ps, begin_ps);
    max_ps = std::max(max_ps, end_ps);
  }
  return (min_ps < max_ps) ? Timespan::FromEndPoints(min_ps, max_ps)
                           : Timespan();
}
Timespan AllStepsTimespan ( const StepDatabaseResult & step_db ) { uint64 min_ps = kuint64max ; uint64 max_ps = 0 ; for ( const auto & step : step_db . step_sequence ( ) ) { Timespan timespan = StepTimespan ( step ) ; uint64 begin_ps = timespan . begin_ps ( ) ; uint64 end_ps = timespan . end_ps ( ) ; min_ps = std :: min ( min_ps , begin_ps ) ; max_ps = std :: max ( max_ps , end_ps ) ; } return ( min_ps < max_ps ) ? Timespan :: FromEndPoints ( min_ps , max_ps ) : Timespan ( ) ; }
Returns the timespan across all steps in the given step_db.
Returns the timespan across all steps in the given step_db .