Helper functions to write simple benchmarks; benchmark tests can run parallel or serial. More...
#include "Config.h"
#include "SystemInfo.h"
#include "Stopwatch.h"
#include "Thread.h"
#include <boost/bind.hpp>
#include <cmath>
#include <limits>
#include <mutex>
Go to the source code of this file.
Classes | |
class | Hypertable::TestStat |
Accumulates min, max, mean and stdev of the test results; based on the Welford method for numerical stability (see http://www.johndcook.com/standard_deviation.html) More... | |
struct | Hypertable::TestFun< FunT > |
Helper class wrapping the invocation of a single test function. More... | |
struct | Hypertable::Config::TestPolicy |
A Policy class for extending command line options. More... | |
Namespaces | |
Hypertable | |
Hypertable definitions | |
Hypertable::Config | |
Macros | |
#define | HT_BENCH_OUT(_label_, _n_, _w_) |
#define | HT_BENCH(_label_, _code_, _n_) |
#define | HT_BENCH1(_label_, _code_, _n_) |
Typedefs | |
typedef Cons< TestPolicy, DefaultPolicy > | Hypertable::Config::DefaultTestPolicy |
Functions | |
void | Hypertable::print_proc_stat () |
Prints statistics about the current process. More... | |
std::ostream & | Hypertable::operator<< (std::ostream &out, const TestStat &stat) |
Prints a TestStat instance to a stream. More... | |
template<typename FunT > | |
void | Hypertable::serial_run (FunT fun, size_t n, bool proc_stat=false) |
Runs a test serially n times in a row while accumulating the benchmark results. More... | |
template<typename FunT > | |
void | Hypertable::parallel_run (FunT fun, size_t n, bool proc_stat=false) |
Runs a test in parallel n times in a row while accumulating the benchmark results. More... | |
template<typename FunT > | |
void | Hypertable::run_test (FunT fun, bool proc_stat=false, const Properties *props=0) |
Runs a test based on command line parameters: More... | |
Helper functions to write simple benchmarks; benchmark tests can run parallel or serial.
Calculates min/max/mean elapsed time.
Definition in file TestUtils.h.
#define HT_BENCH | ( | _label_, | |
_code_, | |||
_n_ | |||
) |
Definition at line 45 of file TestUtils.h.
#define HT_BENCH1 | ( | _label_, | |
_code_, | |||
_n_ | |||
) |
Definition at line 52 of file TestUtils.h.
#define HT_BENCH_OUT | ( | _label_, | |
_n_, | |||
_w_ | |||
) |
Definition at line 39 of file TestUtils.h.