| 86 | } |
| 87 | |
| 88 | void 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 | |
| 110 | void TFE_MonitoringCounterCellIncrementBy(TFE_MonitoringCounterCell* cell, |
| 111 | int64_t value) { |
nothing calls this directly
no test coverage detected