tests/benchmark_tools.h
changeset 13 0ab493e5250e
parent 12 4eab99ff2666
equal deleted inserted replaced
2:96e9ae755a9f 3:82a5d86e6976
    26 
    26 
    27 extern std::string test_name;
    27 extern std::string test_name;
    28 extern std::string instance_name;
    28 extern std::string instance_name;
    29 
    29 
    30 extern const std::string DATADIR_PATH;
    30 extern const std::string DATADIR_PATH;
    31 
    31 extern const std::string BENCHMARK_BUILD_ID;
    32 
    32 
    33 inline void logTime(const std::string &_instance_name,
    33 inline void logTime(const std::string &_instance_name,
    34 		    const std::string &subtest_name,
    34 		    const std::string &subtest_name,
    35 		    const lemon::TimeStamp &time)
    35 		    const lemon::TimeStamp &time)
    36 {
    36 {
    37   std::cout << "*** " << test_name
    37   std::cout << "*** " << BENCHMARK_BUILD_ID 
       
    38 	    << ' ' << test_name
    38 	    << ' ' << _instance_name
    39 	    << ' ' << _instance_name
    39 	    << ' ' << subtest_name
    40 	    << ' ' << subtest_name
    40 	    << ' ' << std::setiosflags(std::ios::fixed) << std::setprecision(4)
    41 	    << ' ' << std::setiosflags(std::ios::fixed) << std::setprecision(4)
    41 	    << time.realTime() << ' '
    42 	    << time.realTime() << ' '
    42             << time.realTime()/(time.userTime()+time.systemTime()) - 1.0
    43             << time.realTime()/(time.userTime()+time.systemTime()) - 1.0