COIN-OR::LEMON - Graph Library

Changeset 11:cf6519daa7fa in lemon-benchmark for tests/benchmark_tools.h


Ignore:
Timestamp:
12/11/11 11:19:39 (8 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Phase:
public
Message:

Refactoring and test instance in test logs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/benchmark_tools.h

    r10 r11  
    77#include<lemon/time_measure.h>
    88
    9 extern const char test_name[];
     9extern std::string test_name;
     10extern std::string instance_name;
    1011
    11 inline void logTime(const std::string &subtest_name, const
    12                     lemon::TimeStamp &time)
     12extern const std::string DATADIR_PATH;
     13
     14
     15inline void logTime(const std::string &_instance_name,
     16                    const std::string &subtest_name,
     17                    const lemon::TimeStamp &time)
    1318{
    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)
    1623            << time.realTime() << ' '
    1724            << time.realTime()/(time.userTime()+time.systemTime()) - 1.0
     
    1926}
    2027
     28inline void logTime(const std::string &subtest_name,
     29                    const lemon::TimeStamp &time)
     30{
     31  logTime(instance_name,subtest_name,time);
     32}
     33
    2134#endif
Note: See TracChangeset for help on using the changeset viewer.