Class of context of invocations of benchmarks.
More...
#include <stat_bench/invocation_context.h>
Class of context of invocations of benchmarks.
Definition at line 40 of file invocation_context.h.
◆ InvocationContext()
stat_bench::InvocationContext::InvocationContext |
( |
BenchmarkCondition | cond, |
|
|
std::size_t | iterations, |
|
|
std::size_t | samples, |
|
|
std::size_t | warming_up_samples ) |
|
inline |
Constructor.
- Parameters
-
[in] | cond | Condition. |
[in] | iterations | Number of iterations. |
[in] | samples | Number of samples (including warming up). |
[in] | warming_up_samples | Number of samples for warming up. |
Definition at line 50 of file invocation_context.h.
◆ add_custom_output() [1/2]
void stat_bench::InvocationContext::add_custom_output |
( |
const CustomOutputName & | name, |
|
|
double | value ) |
|
inline |
Add a custom output without statistics.
- Parameters
-
[in] | name | Name. |
[in] | value | Output value. |
Definition at line 158 of file invocation_context.h.
◆ add_custom_output() [2/2]
void stat_bench::InvocationContext::add_custom_output |
( |
std::string | name, |
|
|
double | value ) |
|
inline |
Add a custom output without statistics.
- Parameters
-
[in] | name | Name. |
[in] | value | Output value. |
Definition at line 168 of file invocation_context.h.
◆ add_custom_stat() [1/2]
Add a custom output with statistics.
- Parameters
-
[in] | name | Name. |
[in] | analysis_type | Type of analysis. |
- Returns
- Object to add output values.
Definition at line 126 of file invocation_context.h.
◆ add_custom_stat() [2/2]
Add a custom output with statistics.
- Parameters
-
[in] | name | Name. |
[in] | analysis_type | Type of analysis. |
- Returns
- Object to add output values.
Definition at line 144 of file invocation_context.h.
◆ custom_outputs()
auto stat_bench::InvocationContext::custom_outputs |
( |
| ) |
const -> const std::vector<std::pair<CustomOutputName, double>>& |
|
inlinenodiscardnoexcept |
Get the custom outputs without statistics.
- Returns
- Custom outputs without statistics.
Definition at line 212 of file invocation_context.h.
◆ custom_stat_outputs()
auto stat_bench::InvocationContext::custom_stat_outputs |
( |
| ) |
const -> const std::vector<std::shared_ptr<stat::CustomStatOutput>>& |
|
inlinenodiscardnoexcept |
Get the custom outputs with statistics.
- Returns
- Custom outputs with statistics.
Definition at line 202 of file invocation_context.h.
◆ durations()
auto stat_bench::InvocationContext::durations |
( |
| ) |
const -> const std::vector<std::vector<clock::Duration>>& |
|
inlinenodiscardnoexcept |
Get the measured durations.
- Note
- Duration of iterations in each sample is measured per thread.
- Returns
- Durations.
Definition at line 192 of file invocation_context.h.
◆ get_param() [1/2]
template<typename T>
auto stat_bench::InvocationContext::get_param |
( |
const param::ParameterName & | param_name | ) |
const -> const T& |
|
inlinenodiscard |
Get a parameter.
- Template Parameters
-
T | Type of the parameter value. |
- Parameters
-
[in] | param_name | Parameter name. |
- Returns
- Parameter value.
Definition at line 102 of file invocation_context.h.
◆ get_param() [2/2]
template<typename T>
auto stat_bench::InvocationContext::get_param |
( |
std::string | param_name | ) |
const -> const T& |
|
inlinenodiscard |
Get a parameter.
- Template Parameters
-
T | Type of the parameter value. |
- Parameters
-
[in] | param_name | Parameter name. |
- Returns
- Parameter value.
Definition at line 115 of file invocation_context.h.
◆ iterations()
auto stat_bench::InvocationContext::iterations |
( |
| ) |
const -> std::size_t |
|
inlinenodiscardnoexcept |
Get the number of iterations.
- Returns
- Number of iterations.
Definition at line 81 of file invocation_context.h.
◆ measure()
template<typename Func>
void stat_bench::InvocationContext::measure |
( |
const Func & | func | ) |
|
|
inline |
◆ samples()
auto stat_bench::InvocationContext::samples |
( |
| ) |
const -> std::size_t |
|
inlinenodiscardnoexcept |
◆ threads()
auto stat_bench::InvocationContext::threads |
( |
| ) |
const -> std::size_t |
|
inlinenodiscardnoexcept |
The documentation for this class was generated from the following file: