aboutsummaryrefslogtreecommitdiff
path: root/Carpet
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2012-02-13 11:25:10 +0100
committerBarry Wardell <barry.wardell@gmail.com>2012-09-11 18:23:02 +0100
commitefbe6b2d280373da6be7959aea7fc9adb6b8f7d7 (patch)
tree4974c9cf0776b9d79779987916042c8cc3244b88 /Carpet
parent0c49771aea8e0d220eb88eec7b34143de4383056 (diff)
TimerNode.cc: Don't print "untimed" unless some child nodes have been printed
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;