Unity Scopes API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
unity::scopes::testing::Benchmark::Result::Timing Struct Reference

#include <unity/scopes/testing/Benchmark.h>

Inheritance diagram for unity::scopes::testing::Benchmark::Result::Timing:

Public Types

typedef std::chrono::duration
< double > 
Seconds
 
- Public Types inherited from unity::scopes::testing::Sample
typedef std::size_t SizeType
 
typedef double ValueType
 
typedef std::function< void(ValueType)> Enumerator
 

Public Member Functions

Sample::SizeType get_size () const
 
Sample::ValueType get_mean () const
 
Sample::ValueType get_variance () const
 
void enumerate (const Sample::Enumerator &enumerator) const
 
bool is_significantly_faster_than_reference (const Timing &reference, double alpha=0.05) const
 Checks if a timing sample is statistically significantly faster than a reference timing sample. More...
 
bool is_significantly_faster_than_reference (double mean, double std_dev, double alpha=0.05) const
 Checks if a timing sample is statistically significantly faster than a reference timing with mean 'mean and std. dev. 'std_dev'. More...
 
bool is_significantly_slower_than_reference (const Timing &reference, double alpha=0.05) const
 Checks if a timing sample is statistically significantly slower than a reference timing sample. More...
 
bool is_significantly_slower_than_reference (double mean, double std_dev, double alpha=0.05) const
 Checks if a timing sample is statistically significantly slower than a reference timing with mean 'mean and std. dev. 'std_dev'. More...
 

Public Attributes

Seconds min {Seconds::min()}
 
Seconds max {Seconds::min()}
 
Seconds mean {Seconds::min()}
 
Seconds std_dev {Seconds::min()}
 
Seconds kurtosis {Seconds::min()}
 
Seconds skewness {Seconds::min()}
 
std::vector< std::pair
< Seconds, double > > 
histogram {}
 
std::vector< Secondssample {}
 

Detailed Description

Timing characteristics captured during the benchmark run.

Member Typedef Documentation

typedef std::chrono::duration<double> unity::scopes::testing::Benchmark::Result::Timing::Seconds

All timing-based results are measures in fractional seconds.

Member Function Documentation

void unity::scopes::testing::Benchmark::Result::Timing::enumerate ( const Sample::Enumerator enumerator) const
virtual

Enumerate all raw observations from the sample.

Implements unity::scopes::testing::Sample.

unity::scopes::testing::Sample::ValueType unity::scopes::testing::Benchmark::Result::Timing::get_mean ( ) const
virtual

Query the empirical mean of the sample.

Implements unity::scopes::testing::Sample.

unity::scopes::testing::Sample::SizeType unity::scopes::testing::Benchmark::Result::Timing::get_size ( ) const
virtual

Query the size of the sample.

Implements unity::scopes::testing::Sample.

unity::scopes::testing::Sample::ValueType unity::scopes::testing::Benchmark::Result::Timing::get_variance ( ) const
virtual

Query the empirical variance of the sample.

Implements unity::scopes::testing::Sample.

bool unity::scopes::testing::Benchmark::Result::Timing::is_significantly_faster_than_reference ( const Timing reference,
double  alpha = 0.05 
) const

Checks if a timing sample is statistically significantly faster than a reference timing sample.

Exceptions
std::runtime_errorif either this sample or the reference sample is not normally distributed.
Parameters
referenceThe reference timing sample to compare to.
alphaThe critical value of the statistical test. The lower, the higher the relevance of the test.
Returns
true iff this timing sample is significantly faster than the reference sample.
bool unity::scopes::testing::Benchmark::Result::Timing::is_significantly_faster_than_reference ( double  mean,
double  std_dev,
double  alpha = 0.05 
) const

Checks if a timing sample is statistically significantly faster than a reference timing with mean 'mean and std. dev. 'std_dev'.

Exceptions
std::runtime_errorif this sample is not normally distributed.
Parameters
meanThe reference mean to compare to.
std_devThe reference std. dev. to compare to.
alphaThe critical value of the statistical test. The lower, the higher the relevance of the test.
Returns
true iff this timing sample is significantly faster than the reference sample.
bool unity::scopes::testing::Benchmark::Result::Timing::is_significantly_slower_than_reference ( const Timing reference,
double  alpha = 0.05 
) const

Checks if a timing sample is statistically significantly slower than a reference timing sample.

Exceptions
std::runtime_errorif either this sample or the reference sample is not normally distributed.
Parameters
referenceThe reference timing sample to compare to.
alphaThe critical value of the statistical test. The lower, the higher the relevance of the test.
Returns
true iff this timing sample is significantly slower than the reference.
bool unity::scopes::testing::Benchmark::Result::Timing::is_significantly_slower_than_reference ( double  mean,
double  std_dev,
double  alpha = 0.05 
) const

Checks if a timing sample is statistically significantly slower than a reference timing with mean 'mean and std. dev. 'std_dev'.

Exceptions
std::runtime_errorif this sample is not normally distributed.
Parameters
meanThe reference mean to compare to.
std_devThe reference std. dev. to compare to.
alphaThe critical value of the statistical test. The lower, the higher the relevance of the test.
Returns
true iff this timing sample is significantly slower than the reference.

Member Data Documentation

std::vector<std::pair<Seconds, double> > unity::scopes::testing::Benchmark::Result::Timing::histogram {}

Histogram of measured execution times for the benchmarked operation.

Seconds unity::scopes::testing::Benchmark::Result::Timing::kurtosis {Seconds::min()}

Kurtosis in execution time for the benchmarked operation.

Seconds unity::scopes::testing::Benchmark::Result::Timing::max {Seconds::min()}

Maximum execution time for the benchmarked operation.

Seconds unity::scopes::testing::Benchmark::Result::Timing::mean {Seconds::min()}

Mean execution time for the benchmarked operation.

Seconds unity::scopes::testing::Benchmark::Result::Timing::min {Seconds::min()}

Minimum execution time for the benchmarked operation.

std::vector<Seconds> unity::scopes::testing::Benchmark::Result::Timing::sample {}

Raw sample vector, with sample.size() == sample_size

Seconds unity::scopes::testing::Benchmark::Result::Timing::skewness {Seconds::min()}

Skewness in execution time for the benchmarked operation.

Seconds unity::scopes::testing::Benchmark::Result::Timing::std_dev {Seconds::min()}

Std. deviation in execution time for the benchmarked operation.


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