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

Function LogAndCount

tensorflow/cc/saved_model/loader.cc:470–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468}
469
470Status LogAndCount(const Status& status, const uint64 start_microseconds,
471 const std::unordered_set<string>& tags,
472 const string& export_dir) {
473 auto log_and_count = [&](const string& status_str) {
474 LOG(INFO) << "SavedModel load for tags { " << absl::StrJoin(tags, " ")
475 << " }; Status: " << status_str << ". Took "
476 << GetLatencyMicroseconds(start_microseconds) << " microseconds.";
477 load_attempt_count->GetCell(export_dir, status_str)->IncrementBy(1);
478 };
479 if (status.ok()) {
480 log_and_count(kLoadAttemptSuccess);
481 } else {
482 log_and_count(kLoadAttemptFail);
483 }
484 load_latency->GetCell(export_dir)
485 ->IncrementBy(GetLatencyMicroseconds(start_microseconds));
486 return status;
487}
488
489} // namespace
490

Callers 1

LoadSavedModelFunction · 0.70

Calls 4

GetLatencyMicrosecondsFunction · 0.85
IncrementByMethod · 0.45
GetCellMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected