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

Function TFE_ProfilerClientMonitor

tensorflow/c/eager/c_api_experimental.cc:88–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88void TFE_ProfilerClientMonitor(const char* service_addr, int duration_ms,
89 int monitoring_level, bool display_timestamp,
90 TF_Buffer* result, TF_Status* status) {
91 tensorflow::Status s =
92 tensorflow::profiler::client::ValidateHostPortPair(service_addr);
93 if (!s.ok()) {
94 Set_TF_Status_from_Status(status, s);
95 return;
96 }
97 string content;
98 s = tensorflow::profiler::client::Monitor(
99 service_addr, duration_ms, monitoring_level, display_timestamp, &content);
100 void* data = tensorflow::port::Malloc(content.length());
101 content.copy(static_cast<char*>(data), content.length(), 0);
102 result->data = data;
103 result->length = content.length();
104 result->data_deallocator = [](void* data, size_t length) {
105 tensorflow::port::Free(data);
106 };
107 tensorflow::Set_TF_Status_from_Status(status, s);
108}
109
110void TFE_MonitoringCounterCellIncrementBy(TFE_MonitoringCounterCell* cell,
111 int64_t value) {

Callers

nothing calls this directly

Calls 8

ValidateHostPortPairFunction · 0.50
MonitorClass · 0.50
MallocFunction · 0.50
FreeFunction · 0.50
okMethod · 0.45
lengthMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected