Public Member Functions

BenchResult Class Reference

A Benchmark Result. More...

#include <BenchResult.h>

List of all members.

Public Member Functions

 BenchResult (std::vector< Stopwatch::Time > &times)
 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

Detailed Description

A Benchmark Result.

This is a container class to store the results of running a benchmark.


Constructor & Destructor Documentation

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.


Member Function Documentation

std::string BenchResult::getName (  ) const [inline]

Get the benchmark name.

Get the name of the benchmark these results are for.

Returns:
The name of the benchmark.
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.

Parameters:
typeThe type of time to get information about. (See TimeType::Type)
valueTypeThe value type of the information you're looking for. (See TimeValue::Value)
Returns:
The value for the parameters passed in.
std::string BenchResult::getValue (  ) const [inline]

Get the value.

Get a string representation of the value this benchmark was run with.

Returns:
A string representation of the value.

The documentation for this class was generated from the following files: