void elem::buildList(List<elem>& tlist, const TraceTimer& timer) { tlist.append(elem(&timer, timer.time())); const std::vector<TraceTimer*>& children = timer.children(); for (int i=0; i<children.size(); i++) { buildList(tlist, *(children[i])); } }
void elem::buildList(std::list<elem>& tlist, const TraceTimer& timer) { tlist.push_back(elem(&timer, timer.time())); const std::vector<TraceTimer*>& children = timer.children(); for (unsigned int i=0; i<children.size(); i++) { buildList(tlist, *(children[i])); } }
void TraceTimer::PruneTimersParentChildPercent(double threshold, TraceTimer* parent) { if (parent->isPruned()) return; unsigned long long int time = parent->time(); const std::vector<TraceTimer*>& children = parent->children(); for (int i=0; i<children.size(); ++i) { TraceTimer* child = children[i]; if (!child->isPruned()) { unsigned long long int childtime = child->time(); if (((double)childtime)/time < threshold) child->prune(); else PruneTimersParentChildPercent(threshold, child); } } }