Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Huck <huck@i6.informatik.rwth-aachen.de>2014-12-04 22:14:11 +0300
committerMatthias Huck <huck@i6.informatik.rwth-aachen.de>2014-12-04 22:14:11 +0300
commitad243f350096d47137a79b214ab38032d7f37ff2 (patch)
tree46b4bd9d42020e64138f036bc049310e48d522e3 /moses/Timer.cpp
parent0f9e8aec91e51cfb93c6f5345f48f93a5a6d8e09 (diff)
Timer: no log output if verbosity parameter is 0
Diffstat (limited to 'moses/Timer.cpp')
-rw-r--r--moses/Timer.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/moses/Timer.cpp b/moses/Timer.cpp
index 75f4154ec..fbe5fcab6 100644
--- a/moses/Timer.cpp
+++ b/moses/Timer.cpp
@@ -2,6 +2,7 @@
#include <iomanip>
#include "Util.h"
#include "Timer.h"
+#include "StaticData.h"
#include "util/usage.hh"
@@ -30,7 +31,7 @@ double Timer::get_elapsed_time() const
void Timer::start(const char* msg)
{
// Print an optional message, something like "Starting timer t";
- if (msg) TRACE_ERR( msg << std::endl);
+ if (msg) VERBOSE(1, msg << std::endl);
// Return immediately if the timer is already running
if (running && !stopped) return;
@@ -53,7 +54,7 @@ void Timer::start(const char* msg)
void Timer::stop(const char* msg)
{
// Print an optional message, something like "Stopping timer t";
- if (msg) TRACE_ERR( msg << std::endl);
+ if (msg) VERBOSE(1, msg << std::endl);
// Return immediately if the timer is not running
if (stopped || !running) return;
@@ -71,10 +72,10 @@ void Timer::stop(const char* msg)
void Timer::check(const char* msg)
{
// Print an optional message, something like "Checking timer t";
- if (msg) TRACE_ERR( msg << " : ");
+ if (msg) VERBOSE(1, msg << " : ");
-// TRACE_ERR( "[" << std::setiosflags(std::ios::fixed) << std::setprecision(2) << (running ? elapsed_time() : 0) << "] seconds\n");
- TRACE_ERR( "[" << (running ? get_elapsed_time() : 0) << "] seconds\n");
+// VERBOSE(1, "[" << std::setiosflags(std::ios::fixed) << std::setprecision(2) << (running ? elapsed_time() : 0) << "] seconds\n");
+ VERBOSE(1, "[" << (running ? get_elapsed_time() : 0) << "] seconds\n");
}
/***