#include <BenchResult.h>
Public Member Functions | |
BenchResult (std::vector< Stopwatch::Time > ×) | |
Create a BenchResult from a vector of Stopwatch::Time values. | |
void | setName (const std::string &n) |
std::string | getName () const |
Get the benchmark name. | |
void | setValue (const std::string &v) |
std::string | getValue () const |
Get the value. | |
void | setTimeValue (TimeType::Type type, TimeValue::Value valueType, double value) |
double | getTimeValue (TimeType::Type type, TimeValue::Value valueType) const |
A Benchmark Result.
This is a container class to store the results of running a benchmark.
BenchResult::BenchResult | ( | std::vector< Stopwatch::Time > & | times ) |
Create a BenchResult from a vector of Stopwatch::Time values.
This takes a vector of Stopwatch::Time values and calculates the supported statistics for the times.
std::string BenchResult::getName | ( | ) | const [inline] |
Get the benchmark name.
Get the name of the benchmark these results are for.
double BenchResult::getTimeValue | ( | TimeType::Type | type, |
TimeValue::Value | valueType | ||
) | const |
Get the time value for the given parameters.
For example, if you want the average wall clock time for this benchmark/value pair pass in TimeType::WALL_CLOCK and TimeValue::AVERAGE.
type | The type of time to get information about. (See TimeType::Type) |
valueType | The value type of the information you're looking for. (See TimeValue::Value) |
std::string BenchResult::getValue | ( | ) | const [inline] |
Get the value.
Get a string representation of the value this benchmark was run with.