From 0f0a550ee538f5163daad1c596d3f3ee01941c1c Mon Sep 17 00:00:00 2001
From: John Romein <romein@astron.nl>
Date: Fri, 15 Sep 2006 08:06:49 +0000
Subject: [PATCH] BugID: 225 Removed redundant and annoying progress messages;
 replaced by timer that only prints output when the compute core is actually
 used.

---
 Appl/CEP/CS1/CS1_BGLProc/src/AH_BGL_Processing.cc | 10 ----------
 Appl/CEP/CS1/CS1_BGLProc/src/WH_BGL_Processing.cc |  5 +++++
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/Appl/CEP/CS1/CS1_BGLProc/src/AH_BGL_Processing.cc b/Appl/CEP/CS1/CS1_BGLProc/src/AH_BGL_Processing.cc
index 893663fe21c..7ef16c5c1a6 100644
--- a/Appl/CEP/CS1/CS1_BGLProc/src/AH_BGL_Processing.cc
+++ b/Appl/CEP/CS1/CS1_BGLProc/src/AH_BGL_Processing.cc
@@ -23,7 +23,6 @@
 #include <lofar_config.h>
 
 #include <Common/lofar_iostream.h>
-#include <Common/Timer.h>
 
 #include <CS1_BGLProc/AH_BGL_Processing.h>
 #include <CS1_BGLProc/WH_BGL_Processing.h>
@@ -215,20 +214,11 @@ void AH_BGL_Processing::init()
 void AH_BGL_Processing::run(int steps) {
   LOG_TRACE_FLOW_STR("Start AH_BGL_Processing::run() "  );
   for (int i = 0; i < steps; i++) {
-    char timer_name[32];
-    sprintf(timer_name, "baseProcess(%d)", i);
-    class NSTimer timer(timer_name, true);
-
     LOG_TRACE_LOOP_STR("processing run " << i );
-    std::clog << "run " << i << " of " << steps << std::endl;
 
-    timer.start();
     for (uint j = 0; j < itsWHs.size(); j ++) {
       itsWHs[j]->baseProcess();
     }
-    timer.stop();
-
-    std::clog << "run " << i << " of " << steps << " done" << std::endl;
   }
   LOG_TRACE_FLOW_STR("Finished AH_BGL_Processing::run() "  );
 }
diff --git a/Appl/CEP/CS1/CS1_BGLProc/src/WH_BGL_Processing.cc b/Appl/CEP/CS1/CS1_BGLProc/src/WH_BGL_Processing.cc
index e59205645b6..9f1119e61c8 100644
--- a/Appl/CEP/CS1/CS1_BGLProc/src/WH_BGL_Processing.cc
+++ b/Appl/CEP/CS1/CS1_BGLProc/src/WH_BGL_Processing.cc
@@ -1771,6 +1771,9 @@ void WH_BGL_Processing::doCorrelate()
 
 void WH_BGL_Processing::process()
 {
+  NSTimer totalTimer("total", true);
+  totalTimer.start();
+
 #if defined HAVE_MPI
   std::clog.precision(15);
   std::clog << "core " << TH_MPI::getCurrentRank() << ": start reading at " << MPI_Wtime() << '\n';
@@ -1820,6 +1823,8 @@ void WH_BGL_Processing::process()
 #if defined HAVE_MPI
   std::clog << "core " << TH_MPI::getCurrentRank() << ": start idling at " << MPI_Wtime() << '\n';
 #endif
+
+  totalTimer.stop();
 }
 
 
-- 
GitLab