Changeset 11:cf6519daa7fa in lemon-benchmark for tests/benchmark_tools.h
- Timestamp:
- 12/11/11 11:19:39 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/benchmark_tools.h
r10 r11 7 7 #include<lemon/time_measure.h> 8 8 9 extern const char test_name[]; 9 extern std::string test_name; 10 extern std::string instance_name; 10 11 11 inline void logTime(const std::string &subtest_name, const 12 lemon::TimeStamp &time) 12 extern const std::string DATADIR_PATH; 13 14 15 inline void logTime(const std::string &_instance_name, 16 const std::string &subtest_name, 17 const lemon::TimeStamp &time) 13 18 { 14 std::cout << "*** " << test_name << ' ' << subtest_name << ' ' 15 << std::setiosflags(std::ios::fixed) << std::setprecision(4) 19 std::cout << "*** " << test_name 20 << ' ' << _instance_name 21 << ' ' << subtest_name 22 << ' ' << std::setiosflags(std::ios::fixed) << std::setprecision(4) 16 23 << time.realTime() << ' ' 17 24 << time.realTime()/(time.userTime()+time.systemTime()) - 1.0 … … 19 26 } 20 27 28 inline void logTime(const std::string &subtest_name, 29 const lemon::TimeStamp &time) 30 { 31 logTime(instance_name,subtest_name,time); 32 } 33 21 34 #endif
Note: See TracChangeset
for help on using the changeset viewer.