MCPcopy Create free account
hub / github.com/dds-bridge/dds / SumLine

Method SumLine

library/src/system/timer.cpp:103–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101
102
103string Timer::SumLine(
104 const Timer& divisor,
105 const string& bname) const
106{
107 stringstream ss;
108 if (count > 0)
109 {
110 ss << setw(14) << left << (bname == "" ? name : bname) <<
111 setw(9) << right << count <<
112 setw(11) << userCum <<
113 setw(7) << setprecision(2) << fixed <<
114 userCum / static_cast<double>(count) <<
115 setw(5) << setprecision(1) << fixed <<
116 100. * userCum / divisor.userCum <<
117 setw(11) << setprecision(0) << fixed <<
118 1000000 * systCum / static_cast<double>(CLOCKS_PER_SEC) <<
119 setw(7) << setprecision(2) << fixed <<
120 1000000 * systCum / static_cast<double>(count * CLOCKS_PER_SEC) <<
121 setw(5) << setprecision(1) << fixed <<
122 100. * systCum / divisor.systCum << "\n";
123 }
124 else
125 {
126 ss << setw(14) << left << (bname == "" ? name : bname) <<
127 setw(9) << right << count <<
128 setw(11) << userCum <<
129 setw(7) << "-" <<
130 setw(5) << "-" <<
131 setw(11) << 1000000 * systCum / static_cast<double>(CLOCKS_PER_SEC) <<
132 setw(7) << "-" <<
133 setw(5) << "-" << "\n";
134 }
135 return ss.str();
136}
137
138
139string Timer::DetailLine() const

Callers 1

PrintStatsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected