Ejemplo n.º 1
0
 bool operator < (const elem& rhs) const
 {
   if (val->isPruned())
   {
     return false;
   }
   return time > rhs.time;
 }
Ejemplo n.º 2
0
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);
        }

    }
}