本文整理汇总了C++中ACE_Sample_History::sample_count方法的典型用法代码示例。如果您正苦于以下问题:C++ ACE_Sample_History::sample_count方法的具体用法?C++ ACE_Sample_History::sample_count怎么用?C++ ACE_Sample_History::sample_count使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACE_Sample_History
的用法示例。
在下文中一共展示了ACE_Sample_History::sample_count方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
Continuous_Worker::print_stats (ACE_Sample_History &history,
ACE_hrtime_t test_end)
{
ACE_GUARD (TAO_SYNCH_MUTEX,
mon,
this->synchronizers_.worker_lock_);
if (individual_continuous_worker_stats)
{
ACE_DEBUG ((LM_DEBUG,
"\n************ Statistics for thread %t ************\n\n"));
ACE_DEBUG ((LM_DEBUG,
"Iterations = %d\n",
history.sample_count ()));
if (do_dump_history)
{
history.dump_samples (ACE_TEXT("HISTORY"), gsf);
}
ACE_Basic_Stats stats;
history.collect_basic_stats (stats);
stats.dump_results (ACE_TEXT("Total"), gsf);
ACE_Throughput_Stats::dump_throughput (ACE_TEXT("Total"), gsf,
test_end - test_start,
stats.samples_count ());
}
history.collect_basic_stats (this->collective_stats_);
ACE_hrtime_t elapsed_time_for_current_thread =
test_end - test_start;
if (elapsed_time_for_current_thread > this->time_for_test_)
this->time_for_test_ = elapsed_time_for_current_thread;
}