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:
authorTetsuo Kiso <tetsuo-s@is.naist.jp>2012-03-03 18:24:08 +0400
committerTetsuo Kiso <tetsuo-s@is.naist.jp>2012-03-03 18:24:08 +0400
commitee5174de5814fd73a3133f7d0e744bc61a4da1df (patch)
treed89d936aa9a580c4e6b3535d96e62807a323ed84 /mert/TimerTest.cpp
parent9a46c5cd7f3dc35a64ac251f3d2ee9bf9cf14b90 (diff)
Delete assertions to check elapsed CPU time.
The accuracy of getrusage() is limited by the resolution of software clock as described in http://www.kernel.org/doc/man-pages/online/pages/man7/time.7.html The assertions required a timer with microsecond accuracy. However, we don't necessarily want the timer, and we don't want to add some time-consuming processes to the test code because we normally build programs again and again, which means we want to run unit tests as quickly as possible.
Diffstat (limited to 'mert/TimerTest.cpp')
-rw-r--r--mert/TimerTest.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/mert/TimerTest.cpp b/mert/TimerTest.cpp
index 094c5c893..d9562a3df 100644
--- a/mert/TimerTest.cpp
+++ b/mert/TimerTest.cpp
@@ -4,7 +4,6 @@
#include <boost/test/unit_test.hpp>
#include <string>
-#include <iostream>
#include <unistd.h>
BOOST_AUTO_TEST_CASE(timer_basic_test) {
@@ -14,16 +13,12 @@ BOOST_AUTO_TEST_CASE(timer_basic_test) {
timer.start();
BOOST_REQUIRE(timer.is_running());
BOOST_REQUIRE(usleep(sleep_time_microsec) == 0);
- // BOOST_CHECK(timer.get_elapsed_cpu_time() > 0.0);
- // BOOST_CHECK(timer.get_elapsed_cpu_time_microseconds() > 0);
BOOST_CHECK(timer.get_elapsed_wall_time() > 0.0);
BOOST_CHECK(timer.get_elapsed_wall_time_microseconds() > 0);
timer.restart();
BOOST_REQUIRE(timer.is_running());
BOOST_REQUIRE(usleep(sleep_time_microsec) == 0);
- // BOOST_CHECK(timer.get_elapsed_cpu_time() > 0.0);
- // BOOST_CHECK(timer.get_elapsed_cpu_time_microseconds() > 0);
BOOST_CHECK(timer.get_elapsed_wall_time() > 0.0);
BOOST_CHECK(timer.get_elapsed_wall_time_microseconds() > 0);