tensorflow/core/profiler/internal/tfprof_code.cc
// Convert to Trace proto into a short readable string.
Convert to Trace proto into a short readable string.
Convert to Trace proto into a short readable string .
std::string GetTraceString(const CallStack::Trace& trace) {
  std::string ntrace =
      absl::StrCat(io::Basename(trace.file()), ":", trace.lineno());
  if (trace.function().length() < 20) {
    absl::StrAppend(&ntrace, ":", trace.function());
  } else {
    absl::StrAppend(&ntrace, ":", trace.function().substr(0, 17), "...");
  }
  return ntrace;
}
std :: string GetTraceString ( const CallStack :: Trace & trace ) { std :: string ntrace = absl :: StrCat ( io :: Basename ( trace . file ( ) ) , " " , trace . lineno ( ) ) ; if ( trace . function ( ) . length ( ) < 20 ) { absl :: StrAppend ( & ntrace , " " , trace . function ( ) ) ; } else { absl :: StrAppend ( & ntrace , " " , trace . function ( ) . substr ( 0 , 17 ) , " " ) ; } return ntrace ; }
Convert to Trace proto into a short readable string.
Convert to Trace proto into a short readable string .