本文整理汇总了C++中StatsMap::end方法的典型用法代码示例。如果您正苦于以下问题:C++ StatsMap::end方法的具体用法?C++ StatsMap::end怎么用?C++ StatsMap::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StatsMap
的用法示例。
在下文中一共展示了StatsMap::end方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: print_output
void print_output() {
g_context->write(
"<link rel='stylesheet' href='/css/hotprofiler.css' type='text/css'>"
"<script language='javascript' src='/js/hotprofiler.js'></script>"
"<p><center><h2>Hotprofiler Data</h2></center><br>"
"<div id='hotprofiler_stats'></div>"
"<script language='javascript'>hotprofiler_data = [");
for (StatsMap::const_iterator iter = m_stats.begin();
iter != m_stats.end(); ++iter) {
g_context->write("{\"fn\": \"");
g_context->write(iter->first.c_str());
g_context->write("\"");
const CountMap &counts = iter->second;
char buf[512];
snprintf(
buf, sizeof(buf),
",\"ct\": %" PRId64 ",\"wt\": %" PRId64 ",\"ut\": %" PRId64 ",\"st\": 0",
counts.count, (int64_t)to_usec(counts.tsc, m_MHz),
(int64_t)to_usec(counts.vtsc, m_MHz, true));
g_context->write(buf);
g_context->write("},\n");
}
g_context->write("]; write_data('ut', false);</script><br><br> <br>");
}
示例2: results
// write statistics of test run to file
void
Responder::write_statistics_to_file(StatsMap mapStats)
{
try
{
ofstream results(_stats_filename.c_str());
for (StatsMap::iterator it = mapStats.begin(); it != mapStats.end(); ++it)
{
STATS& stats = it->second;
double d = 0.0;
if (stats.detected > 0)
d = 1.0 - ((double)stats.missed / (double)stats.detected);
cout << "\t" << setprecision(6) << stats.delay << "\t\t" << setprecision(6) << d << endl;
results << (stats.delay * _opt.time_mul) << " " << setprecision(6) << d << endl;
}
cout << "Statistics written to: " << _stats_filename << endl;
}
catch (...)
{
cout << "Failed to write statistics to: " << _stats_filename << endl;
}
}
示例3: extractStats
static bool extractStats(phpret& ret, StatsMap& stats, int flags, int64 MHz)
{
for (typename StatsMap::const_iterator iter = stats.begin();
iter != stats.end(); ++iter) {
returnVals(ret, iter->first, iter->second, flags, MHz);
}
return true;
}