From 75132b735b4f0f0ec7f86f5d3db9b8e05209ab63 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Fri, 15 May 2020 11:54:21 -0700 Subject: [PATCH] Minor cleanup for strings in xplane_to_profile_response. PiperOrigin-RevId: 311774079 Change-Id: I445cd1121c548dd2beb133057eeab4f434939df9 --- .../core/profiler/convert/xplane_to_profile_response.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tensorflow/core/profiler/convert/xplane_to_profile_response.cc b/tensorflow/core/profiler/convert/xplane_to_profile_response.cc index e6fe74942fc..70a07171310 100644 --- a/tensorflow/core/profiler/convert/xplane_to_profile_response.cc +++ b/tensorflow/core/profiler/convert/xplane_to_profile_response.cc @@ -14,6 +14,8 @@ limitations under the License. ==============================================================================*/ #include "tensorflow/core/profiler/convert/xplane_to_profile_response.h" +#include + #include "absl/container/flat_hash_set.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" @@ -78,14 +80,14 @@ Status ConvertProtoToJson(const Proto& proto_output, std::string* json_output) { // tensorflow::StringPiece. auto error_msg = status.message(); return errors::Internal( - strings::StrCat("Could not convert proto to JSON string: ", - StringPiece(error_msg.data(), error_msg.length()))); + "Could not convert proto to JSON string: ", + absl::string_view(error_msg.data(), error_msg.length())); } return Status::OK(); } // Returns the tool name with extension. -string ToolName(absl::string_view tool) { +std::string ToolName(absl::string_view tool) { if (tool == kTraceViewer) return "trace.json.gz"; if (tool == kMemoryProfile) return "memory_profile.json.gz"; return absl::StrCat(tool, ".pb");