Public Member Functions | Private Attributes | List of all members
ecl::TimeData Class Reference

Device for conveniently storing and analysing benchmarking times. More...

#include <time_data.hpp>

Public Member Functions

ecl::Duration average () const
 Return the average of the elements currently stored. More...
 
void clear ()
 Reset the container (i.e. clear it). More...
 
void push_back (const ecl::Duration &duration)
 Append a new timing measurement to the sequence. More...
 
ecl::Duration stdDev () const
 Return the standard deviation of the elements currently stored. More...
 
ecl::Duration variance () const
 Return the variance of the elements currently stored. More...
 

Private Attributes

std::vector< ecl::Durationdurations
 

Detailed Description

Device for conveniently storing and analysing benchmarking times.

This serves as both a container and interface for generating statistics on a sequence of timings.

Definition at line 45 of file time_data.hpp.

Member Function Documentation

◆ average()

ecl::Duration ecl::TimeData::average ( ) const

Return the average of the elements currently stored.

Returns
Duration : average.

Definition at line 30 of file lib/time_data.cpp.

◆ clear()

void ecl::TimeData::clear ( )
inline

Reset the container (i.e. clear it).

Definition at line 67 of file time_data.hpp.

◆ push_back()

void ecl::TimeData::push_back ( const ecl::Duration duration)
inline

Append a new timing measurement to the sequence.

Parameters
duration: measurement to be added.

Definition at line 63 of file time_data.hpp.

◆ stdDev()

ecl::Duration ecl::TimeData::stdDev ( ) const

Return the standard deviation of the elements currently stored.

Returns
Duration : standard deviation.

Definition at line 38 of file lib/time_data.cpp.

◆ variance()

ecl::Duration ecl::TimeData::variance ( ) const

Return the variance of the elements currently stored.

Returns
Duration : variance.

Definition at line 48 of file lib/time_data.cpp.

Member Data Documentation

◆ durations

std::vector<ecl::Duration> ecl::TimeData::durations
private

Definition at line 89 of file time_data.hpp.


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


ecl_time
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:19