IWYU in profiler/rpc

PiperOrigin-RevId: 311030427
Change-Id: If8a07153240f46a3333135587c36fdd59f661c1f
This commit is contained in:
Jose Baiocchi 2020-05-11 17:41:07 -07:00 committed by TensorFlower Gardener
parent 1d8f37a926
commit 5aefa24d78
8 changed files with 26 additions and 19 deletions

View File

@ -19,9 +19,7 @@ cc_library(
"//tensorflow/core/profiler/convert:xplane_to_profile_response",
"//tensorflow/core/profiler/lib:profiler_session_headers",
"//tensorflow/core/profiler/protobuf:xplane_proto_cc",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
tf_grpc_cc_dependency(),
],
)

View File

@ -12,7 +12,9 @@ cc_library(
deps = [
":save_profile",
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core/profiler:profiler_analysis_proto_cc",
"//tensorflow/core/profiler:profiler_options_proto_cc",
"//tensorflow/core/profiler:profiler_service_proto_cc",
"@com_google_absl//absl/strings",
tf_grpc_cc_dependency(),

View File

@ -14,18 +14,25 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/core/profiler/rpc/client/capture_profile.h"
#include <iostream>
#include <limits>
#include <memory>
#include <vector>
#include "grpcpp/grpcpp.h"
#include "absl/strings/escaping.h"
#include "absl/strings/match.h"
#include "absl/strings/numbers.h"
#include "absl/strings/str_join.h"
#include "absl/strings/str_split.h"
#include "tensorflow/core/platform/errors.h"
#include "tensorflow/core/platform/path.h"
#include "tensorflow/core/platform/status.h"
#include "tensorflow/core/platform/types.h"
#include "tensorflow/core/profiler/profiler_analysis.grpc.pb.h"
#include "tensorflow/core/profiler/profiler_analysis.pb.h"
#include "tensorflow/core/profiler/profiler_options.pb.h"
#include "tensorflow/core/profiler/profiler_service.grpc.pb.h"
#include "tensorflow/core/profiler/profiler_service.pb.h"
#include "tensorflow/core/profiler/rpc/client/save_profile.h"
#include "tensorflow/core/protobuf/error_codes.pb.h"
namespace tensorflow {
namespace profiler {

View File

@ -19,7 +19,7 @@ limitations under the License.
#include "tensorflow/core/platform/status.h"
#include "tensorflow/core/platform/types.h"
#include "tensorflow/core/profiler/profiler_service.grpc.pb.h"
#include "tensorflow/core/profiler/profiler_options.pb.h"
namespace tensorflow {
namespace profiler {

View File

@ -17,7 +17,6 @@ limitations under the License.
#include <initializer_list>
#include <memory>
#include <ostream>
#include <sstream>
#include <string>
#include <vector>

View File

@ -16,17 +16,19 @@ limitations under the License.
#include "tensorflow/core/profiler/rpc/profiler_server.h"
#include <memory>
#include <utility>
#include <string>
#include "grpcpp/grpcpp.h"
#include "absl/strings/str_cat.h"
#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/types.h"
#include "tensorflow/core/profiler/profiler_service.grpc.pb.h"
#include "tensorflow/core/profiler/rpc/profiler_service_impl.h"
namespace tensorflow {
void ProfilerServer::StartProfilerServer(int32 port) {
string server_address = absl::StrCat("0.0.0.0:", port);
std::string server_address = absl::StrCat("0.0.0.0:", port);
service_ = CreateProfilerService();
::grpc::ServerBuilder builder;
builder.AddListeningPort(server_address, ::grpc::InsecureServerCredentials());

View File

@ -15,21 +15,22 @@ limitations under the License.
#include "tensorflow/core/profiler/rpc/profiler_service_impl.h"
#include <memory>
#include "grpcpp/support/status.h"
#include "absl/container/flat_hash_map.h"
#include "absl/container/flat_hash_set.h"
#include "absl/memory/memory.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_join.h"
#include "absl/strings/string_view.h"
#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/env_time.h"
#include "tensorflow/core/platform/errors.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/mutex.h"
#include "tensorflow/core/platform/status.h"
#include "tensorflow/core/profiler/convert/xplane_to_profile_response.h"
#include "tensorflow/core/profiler/internal/profiler_interface.h"
#include "tensorflow/core/profiler/lib/profiler_session.h"
#include "tensorflow/core/profiler/profiler_service.grpc.pb.h"
#include "tensorflow/core/profiler/profiler_service.pb.h"
#include "tensorflow/core/profiler/protobuf/xplane.pb.h"
@ -65,7 +66,7 @@ class ProfilerServiceImpl : public grpc::ProfilerService::Service {
}
Env* env = Env::Default();
for (size_t i = 0; i < req->duration_ms(); ++i) {
for (uint64 i = 0; i < req->duration_ms(); ++i) {
env->SleepForMicroseconds(EnvTime::kMillisToMicros);
if (ctx->IsCancelled()) {
return ::grpc::Status::CANCELLED;

View File

@ -15,10 +15,8 @@ limitations under the License.
#ifndef TENSORFLOW_CORE_PROFILER_RPC_PROFILER_SERVICE_IMPL_H_
#define TENSORFLOW_CORE_PROFILER_RPC_PROFILER_SERVICE_IMPL_H_
#include "grpcpp/grpcpp.h"
#include "grpcpp/server_context.h"
#include "grpcpp/support/status.h"
#include "tensorflow/core/profiler/lib/profiler_session.h"
#include <memory>
#include "tensorflow/core/profiler/profiler_service.grpc.pb.h"
namespace tensorflow {