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

Function FormatToalExecTime

tensorflow/core/profiler/internal/tfprof_op.cc:30–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28namespace tfprof {
29namespace {
30string FormatToalExecTime(const ShowMultiNode* node,
31 const ShowMultiNode* root) {
32 double accu_pct = 0.0;
33 double pct = 0.0;
34 if (node->proto().total_exec_micros() > 0) {
35 accu_pct = 100.0 * node->proto().total_exec_micros() /
36 root->proto().total_exec_micros();
37 pct =
38 100.0 * node->proto().exec_micros() / root->proto().total_exec_micros();
39 }
40
41 return strings::Printf(
42 "%30s", strings::Printf("%s (%.2f%%, %.2f%%)",
43 FormatTime(node->proto().exec_micros()).c_str(),
44 accu_pct, pct)
45 .c_str());
46}
47string FormatCPUExecTime(const ShowMultiNode* node, const ShowMultiNode* root) {
48 double accu_pct = 0.0;
49 double pct = 0.0;

Callers 1

FormatNodeMethod · 0.85

Calls 5

PrintfFunction · 0.85
FormatTimeFunction · 0.85
protoMethod · 0.80
c_strMethod · 0.80
exec_microsMethod · 0.45

Tested by

no test coverage detected