MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Monitor

Function Monitor

tensorflow/core/profiler/rpc/client/capture_profile.cc:250–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250Status Monitor(const tensorflow::string& service_addr, int duration_ms,
251 int monitoring_level, bool display_timestamp, string* result) {
252 MonitorRequest request =
253 PopulateMonitorRequest(duration_ms, monitoring_level, display_timestamp);
254
255 ::grpc::ClientContext context;
256 ::grpc::ChannelArguments channel_args;
257 channel_args.SetInt(GRPC_ARG_MAX_MESSAGE_LENGTH,
258 std::numeric_limits<int32>::max());
259 std::unique_ptr<grpc::ProfilerService::Stub> stub =
260 grpc::ProfilerService::NewStub(::grpc::CreateCustomChannel(
261 "dns:///" + service_addr, ::grpc::InsecureChannelCredentials(),
262 channel_args));
263 MonitorResponse response;
264 TF_RETURN_IF_ERROR(
265 FromGrpcStatus(stub->Monitor(&context, request, &response)));
266 *result = response.data();
267 return Status::OK();
268}
269
270} // namespace client
271} // namespace profiler

Callers

nothing calls this directly

Calls 5

PopulateMonitorRequestFunction · 0.85
FromGrpcStatusFunction · 0.85
MonitorMethod · 0.80
maxFunction · 0.50
dataMethod · 0.45

Tested by

no test coverage detected