/* -*- mode: C++; indent-tabs-mode: nil; -*- * * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * * Permission to use, modify and distribute this software is granted * provided that this copyright notice appears in all copies. For * precise terms see the accompanying LICENSE file. * * This software is provided "AS IS" with no warranty of any kind, * express or implied, and with no claim as to its suitability for any * purpose. * */ #ifndef BENCHMARK_TOOLS_H #define BENCHMARK_TOOLS_H #include #include #include #include extern std::string test_name; extern std::string instance_name; extern const std::string DATADIR_PATH; extern const std::string BENCHMARK_BUILD_ID; inline void logTime(const std::string &_instance_name, const std::string &subtest_name, const lemon::TimeStamp &time) { std::cout << "*** " << BENCHMARK_BUILD_ID << ' ' << test_name << ' ' << _instance_name << ' ' << subtest_name << ' ' << std::setiosflags(std::ios::fixed) << std::setprecision(4) << time.realTime() << ' ' << time.realTime()/(time.userTime()+time.systemTime()) - 1.0 << std::endl; } inline void logTime(const std::string &subtest_name, const lemon::TimeStamp &time) { logTime(instance_name,subtest_name,time); } #endif