cpp-stat-bench 0.24.0
Benchmark library with statistics for C++.
Loading...
Searching...
No Matches
stat_bench::stat::CustomStatOutput Class Reference

Class of custom outputs with statistics. More...

#include <stat_bench/stat/custom_stat_output.h>

+ Collaboration diagram for stat_bench::stat::CustomStatOutput:

Public Member Functions

 CustomStatOutput (CustomOutputName name, std::size_t threads, std::size_t samples, std::size_t warming_up_samples, std::size_t iterations, CustomOutputAnalysisType analysis_type)
 Constructor.
 
void add (std::size_t thread_index, std::size_t sample_index, double val)
 Add a value.
 
auto data () const noexcept -> const std::vector< std::vector< double > > &
 Get data.
 
auto name () const noexcept -> const CustomOutputName &
 Get the name.
 
void preprocess (const std::vector< std::vector< clock::Duration > > &durations)
 Preprocess data.
 
auto stat () const -> Statistics
 Calculate statistics.
 

Detailed Description

Class of custom outputs with statistics.

Definition at line 47 of file custom_stat_output.h.

Constructor & Destructor Documentation

◆ CustomStatOutput()

stat_bench::stat::CustomStatOutput::CustomStatOutput ( CustomOutputName name,
std::size_t threads,
std::size_t samples,
std::size_t warming_up_samples,
std::size_t iterations,
CustomOutputAnalysisType analysis_type )
inline

Constructor.

Parameters
[in]nameName.
[in]threadsNumber of threads.
[in]samplesNumber of samples (including warming_up_samples).
[in]warming_up_samplesNumber of samples for warming up. (They're ignored.)
[in]iterationsNumber of iterations.
[in]analysis_typeType of analysis.

Definition at line 60 of file custom_stat_output.h.

Member Function Documentation

◆ add()

void stat_bench::stat::CustomStatOutput::add ( std::size_t thread_index,
std::size_t sample_index,
double val )
inline

Add a value.

Parameters
[in]thread_indexIndex of the thread.
[in]sample_indexIndex of the sample.
[in]valValue of the current iteration.

Definition at line 86 of file custom_stat_output.h.

◆ data()

auto stat_bench::stat::CustomStatOutput::data ( ) const -> const std::vector<std::vector<double>>&
inlinenodiscardnoexcept

Get data.

Returns
Data.

Definition at line 138 of file custom_stat_output.h.

◆ name()

auto stat_bench::stat::CustomStatOutput::name ( ) const -> const CustomOutputName&
inlinenodiscardnoexcept

Get the name.

Returns
Name.

Definition at line 129 of file custom_stat_output.h.

◆ preprocess()

void stat_bench::stat::CustomStatOutput::preprocess ( const std::vector< std::vector< clock::Duration > > & durations)
inline

Preprocess data.

Parameters
[in]durationsDurations.

Definition at line 98 of file custom_stat_output.h.

◆ stat()

auto stat_bench::stat::CustomStatOutput::stat ( ) const -> Statistics
inlinenodiscard

Calculate statistics.

Returns
Statistics.

Definition at line 122 of file custom_stat_output.h.


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