MCPcopy Create free account
hub / github.com/LBANN/lbann / print_timer

Function print_timer

src/utils/timer_map.cpp:49–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49static void print_timer(std::ostream& os,
50 std::string const& k,
51 AccumulatingTimer const& t,
52 unsigned const width,
53 unsigned const indent)
54{
55 // clang-format off
56 auto const key_width = width - 65U - indent;
57 os << std::string(indent, ' ')
58 << std::setw(key_width) << std::left
59 << truncate_to_width(k, key_width) << " | "
60 << std::setw(8) << std::right << t.samples() << " | "
61 << std::scientific << std::setprecision(4)
62 << std::setw(10) << std::right << t.total_time() << " | "
63 << std::setw(10) << std::right << t.mean() << " | "
64 << std::setw(10) << std::right << t.min() << " | "
65 << std::setw(10) << std::right << t.max() << " |\n";
66 // clang-format on
67}
68
69static unsigned output_width(std::ostream& os)
70{

Callers 1

print_implMethod · 0.85

Calls 5

total_timeMethod · 0.80
samplesMethod · 0.45
meanMethod · 0.45
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected