19 const std::map<int,int>&
binsizes) : m_counter(0),
20 m_binstrings(bincaptions),
35 std::stringstream
out;
36 out << std::fixed << std::setprecision(2);
38 out <<
"Bin Statistics: " << std::endl;
43 totnum += (*it).second;
44 int curcalls =
m_calls.at((*it).first);
45 int curlen = (*it).second;
49 use = 100 * curcalls/curlen;
51 if (maxuse < use) maxuse = use;
52 if (minuse == -1) minuse = use;
53 else if (minuse > use) minuse = use;
55 out <<
name <<
" size " << std::setw(7) << curlen <<
" / calls " << std::setw(9) << curcalls <<
" ("<< std::setw(6) << use <<
"%)" << std::endl;
62 out <<
"Total: size " << std::setw(6) << totnum <<
" / calls " << std::setw(9) <<
m_counter <<
" (min " << minuse <<
"% av " << (100 *
m_counter/totnum) <<
"% max " << maxuse <<
"%)" << std::endl;