COIN-OR::LEMON - Graph Library

source: lemon-benchmark/tests/benchmark_tools.h @ 10:d7ce0311ece2

Last change on this file since 10:d7ce0311ece2 was 10:d7ce0311ece2, checked in by Alpar Juttner <alpar@…>, 8 years ago

Some common benchmarking tools added

File size: 547 bytes
Line 
1#ifndef BENCHMARK_TOOLS_H
2#define BENCHMARK_TOOLS_H
3
4#include<string>
5#include<iostream>
6#include<iomanip>
7#include<lemon/time_measure.h>
8
9extern const char test_name[];
10
11inline void logTime(const std::string &subtest_name, const
12                    lemon::TimeStamp &time)
13{
14  std::cout << "*** " << test_name << ' ' << subtest_name << ' '
15            << std::setiosflags(std::ios::fixed) << std::setprecision(4)
16            << time.realTime() << ' '
17            << time.realTime()/(time.userTime()+time.systemTime()) - 1.0
18            << std::endl;
19}
20
21#endif
Note: See TracBrowser for help on using the repository browser.