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

Method Line

library/src/system/time_stat.cpp:83–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83string TimeStat::Line() const
84{
85 if (number == 0)
86 return "";
87
88 double avg = static_cast<double>(cum) / static_cast<double>(number);
89 double arg = (cumsq / static_cast<double>(number)) - avg * avg;
90 double sdev = (arg >= 0. ? sqrt(arg) : 0.);
91
92 stringstream ss;
93 ss << setw(9) << right << number <<
94 setw(13) << cum <<
95 setw(13) << setprecision(0) << fixed << avg <<
96 setw(13) << setprecision(0) << fixed << sdev <<
97 setw(13) << setprecision(2) << fixed << sdev/avg << "\n";
98
99 return ss.str();
100}

Callers 1

ListMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected