JayBeams
0.1
Another project to have fun coding.
|
Refactor non-template parts of the microbenchmark template class. More...
#include <microbenchmark_base.hpp>
Classes | |
struct | summary |
A simple object to contain the summary of the test results. More... | |
Public Types | |
typedef std::chrono::steady_clock | clock |
typedef clock::duration | duration |
typedef std::pair< int, duration > | result |
typedef std::vector< result > | results |
Public Member Functions | |
microbenchmark_base (microbenchmark_config const &cfg) | |
Constructor from a configuration. More... | |
void | typical_output (results const &r) const |
Produce the results of the test in a format that works for most cases. More... | |
void | write_results (std::ostream &os, results const &r) const |
Stream the detailed results. More... | |
Protected Attributes | |
microbenchmark_config | config_ |
Refactor non-template parts of the microbenchmark template class.
Definition at line 17 of file microbenchmark_base.hpp.
typedef std::chrono::steady_clock jb::testing::microbenchmark_base::clock |
Definition at line 19 of file microbenchmark_base.hpp.
typedef clock::duration jb::testing::microbenchmark_base::duration |
Definition at line 20 of file microbenchmark_base.hpp.
typedef std::pair<int, duration> jb::testing::microbenchmark_base::result |
Definition at line 21 of file microbenchmark_base.hpp.
typedef std::vector<result> jb::testing::microbenchmark_base::results |
Definition at line 22 of file microbenchmark_base.hpp.
|
inlineexplicit |
Constructor from a configuration.
Definition at line 27 of file microbenchmark_base.hpp.
void jb::testing::microbenchmark_base::typical_output | ( | results const & | r | ) | const |
Produce the results of the test in a format that works for most cases.
In most of the JayBeams tests we print the summary results to stderr and the summary results to stdout. That makes it relatively easy to capture both separately in driver scripts.
Definition at line 5 of file microbenchmark_base.cpp.
References config_, jb::testing::microbenchmark_config::size, jb::testing::microbenchmark_config::test_case, jb::testing::microbenchmark_config::verbose, and write_results().
void jb::testing::microbenchmark_base::write_results | ( | std::ostream & | os, |
results const & | r | ||
) | const |
Stream the detailed results.
Definition at line 20 of file microbenchmark_base.cpp.
References config_, and jb::testing::microbenchmark_config::prefix.
Referenced by typical_output().
|
protected |
Definition at line 72 of file microbenchmark_base.hpp.
Referenced by typical_output(), and write_results().