aboutsummaryrefslogtreecommitdiff
path: root/Carpet
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet')
-rw-r--r--Carpet/Carpet/src/TimerNode.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/Carpet/Carpet/src/TimerNode.cc b/Carpet/Carpet/src/TimerNode.cc
index 7aaf9e9b0..326a84d05 100644
--- a/Carpet/Carpet/src/TimerNode.cc
+++ b/Carpet/Carpet/src/TimerNode.cc
@@ -179,17 +179,21 @@ namespace Carpet {
<< " " << space << d_name << endl;
double children_time = 0;
+ bool printed_children = false;
// Recursively print the children
for(map<string,TimerNode*>::iterator iter = d_children.begin();
iter != d_children.end(); iter++)
{
if (iter->second->getTime() * 100.0 / total > threshold)
+ {
iter->second->print(out,total,level+1,threshold);
+ printed_children = true;
+ }
children_time += iter->second->getTime();
}
- if (d_children.size() > 0)
+ if (d_children.size() > 0 && printed_children)
{
const double untimed = t - children_time;