diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2012-02-13 11:25:10 +0100 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2012-09-11 18:23:02 +0100 |
commit | efbe6b2d280373da6be7959aea7fc9adb6b8f7d7 (patch) | |
tree | 4974c9cf0776b9d79779987916042c8cc3244b88 | |
parent | 0c49771aea8e0d220eb88eec7b34143de4383056 (diff) |
TimerNode.cc: Don't print "untimed" unless some child nodes have been printed
-rw-r--r-- | Carpet/Carpet/src/TimerNode.cc | 6 |
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; |