本文整理汇总了C++中TIMER::get_tau_timers方法的典型用法代码示例。如果您正苦于以下问题:C++ TIMER::get_tau_timers方法的具体用法?C++ TIMER::get_tau_timers怎么用?C++ TIMER::get_tau_timers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TIMER
的用法示例。
在下文中一共展示了TIMER::get_tau_timers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
virtual void execute(TIMER& timer) {
void ** tau_timers = timer.get_tau_timers();
std::vector<std::string>::const_iterator it = line_to_str_.begin();
for (int line_num = 0; it!= line_to_str_.end(); ++it, ++line_num){
const std::string &line_str = *it;
if (line_str != ""){
int total_time_timer_offset = line_num + sialx_lines_ * static_cast<int>(ServerTimer::TOTALTIME);
if (tau_timers[total_time_timer_offset] != NULL){
// Set total time string
std::stringstream tot_sstr;
tot_sstr << sip::GlobalState::get_program_num() << ": " << line_num << ": " << " Total " << line_str;
const char *tau_string = tot_sstr.str().c_str();
TAU_PROFILE_TIMER_SET_NAME(tau_timers[total_time_timer_offset], tau_string);
}
int block_wait_timer_offset = line_num + sialx_lines_ * static_cast<int>(ServerTimer::BLOCKWAITTIME);
if (tau_timers[block_wait_timer_offset] != NULL){
// Set block wait time string
std::stringstream blkw_sstr;
blkw_sstr << sip::GlobalState::get_program_num() << ":" << line_num <<":" << " Blkwait " << line_str ;
const char *tau_string = blkw_sstr.str().c_str();
TAU_PROFILE_TIMER_SET_NAME(tau_timers[block_wait_timer_offset], tau_string);
}
int read_timer_offset = line_num + sialx_lines_ * static_cast<int>(ServerTimer::READTIME);
if (tau_timers[read_timer_offset] != NULL){
// Set disk read time string
std::stringstream readd_sstr;
readd_sstr << sip::GlobalState::get_program_num() << ":" << line_num <<":" << " ReadDisk " << line_str ;
const char *tau_string = readd_sstr.str().c_str();
TAU_PROFILE_TIMER_SET_NAME(tau_timers[read_timer_offset], tau_string);
}
int write_timer_offset = line_num + sialx_lines_ * static_cast<int>(ServerTimer::WRITETIME);
if (tau_timers[write_timer_offset] != NULL){
// Set disk write time string
std::stringstream writed_sstr;
writed_sstr << sip::GlobalState::get_program_num() << ":" << line_num <<":" << " WriteDisk " << line_str ;
const char *tau_string = writed_sstr.str().c_str();
TAU_PROFILE_TIMER_SET_NAME(tau_timers[write_timer_offset], tau_string);
}
}
}
}