12 level_(
std::numeric_limits<unsigned>::max()),name_(
"INVALID"),parent_(NULL)
23 for (
unsigned i=0; i<level_; ++i)
25 os << name_<<
":"<<
accumulatedTime()<<
" [" << count_started_<<
"] ("<< count_updates_ <<
")"<<std::endl;
27 for (
size_t i=0; i<sub_timers_.size(); ++i) {
28 t_total += sub_timers_[i].accumulatedTime();
29 sub_timers_[i].report(os);
31 if ( sub_timers_.size() == 0 )
33 for (
unsigned i=0; i<=level_; ++i)
42 if (get_full_name() == name) {
47 for (
unsigned i=0;i<sub_timers_.size(); ++i){
48 t = sub_timers_[i].findTimer(name,found);
90 hist_[i].resize(num_names);
106 for (
int i=0;i<num_names; ++i) {
111 used[i] = t.count==0? 0:1;
113 updates[i] = t.updates;
127 for (
int i=0;i<num_names; ++i) {
133 int bin=(time[i]-
min_[i])/dh;
134 bins[i] = std::max(std::min(bin,options.
num_histogram-1) , 0);
139 for (
int i=0;i<num_names; ++i) {
150 for (
int i=0;i<num_names; ++i)
157 std::pair<std::string, std::string>
getPrefix(
const std::string &name) {
158 for (std::size_t i=name.size()-1; i>0; --i)
159 if (name[i] ==
'@') {
160 return std::pair<std::string, std::string>(name.substr(0,i), name.substr(i+1, name.size()));
162 return std::pair<std::string, std::string>(std::string(
""), name);
168 double total_time = 0.0;
174 if ( (level != print_level) || (level >= options.
max_levels) )
177 if ( prefix != split_names.first)
181 for (
int l=0; l<level; ++l)
183 os << split_names.second <<
": ";
188 os <<
" - "<<
sum_[i]/
active_[i]/parent_time*100<<
"%";
196 os <<
" {min="<<
min_[i]<<
", max="<<
max_[i];
207 os <<
", "<<
hist_[h][i];
217 for (
int l=0; l<=level; ++l)
219 os <<
"Remainder: " <<
sum_[i]/
active_[i]- sub_time;
234 if (rank(*comm) == 0 ) {
236 os <<
"*** Teuchos::StackedTimer::report() - Remainder for a block will be ***"
237 <<
"\n*** incorrect if a timer in the block does not exist on every rank ***"
238 <<
"\n*** of the MPI Communicator. ***"
242 os <<
"Teuchos::StackedTimer::report() - max_levels set to " << options.
max_levels
243 <<
", to print more levels, increase value of OutputOptions::max_levels." << std::endl;