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

Method PrintAverageDepth

library/src/ab_stats.cpp:221–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219
220
221void ABstats::PrintAverageDepth(
222 ofstream& fout,
223 const ABtracker& ABsidesSum) const
224{
225 fout << "\nTotal" <<
226 setw(7) << right << ABnodes.sum <<
227 setw(7) << ABnodesCum.sumCum << "\n";
228
229 if (! ABnodesCum.sumCum)
230 return;
231
232 fout << setw(5) << left << "Avg" << right;
233
234 if (ABnodes.sum)
235 fout << setw(7) << setprecision(1) << fixed <<
236 ABnodes.sumWeighted / static_cast<double>(ABnodes.sum);
237 else
238 fout << setw(7) << "";
239
240 fout << setw(7) << setprecision(1) << fixed <<
241 ABnodesCum.sumCumWeighted / static_cast<double>(ABnodesCum.sumCum) <<
242 "\n\n";
243
244 fout << setw(5) << left << "Nodes" <<
245 setw(7) << right << ABnodes.sum <<
246 setw(7) << ABnodesCum.sumCum << "\n";
247
248 fout << setw(5) << left << "Ends" <<
249 setw(7) << right << ABsidesSum.sum <<
250 setw(7) << ABsidesSum.sumCum << "\n";
251
252 if (ABsidesSum.sum)
253 fout << setw(5) << left << "Ratio" <<
254 setw(6) << right << setprecision(0) << fixed <<
255 100. * ABsidesSum.sum / static_cast<double>(ABnodes.sum) << "%" <<
256 setw(6) << setprecision(0) << fixed <<
257 100. * ABsidesSum.sumCum / static_cast<double>(ABnodesCum.sumCum) <<
258 "%\n\n";
259}
260
261
262void ABstats::PrintHeaderDetail(ofstream& fout) const

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected