CppBenchmark
1.0.4.0
C++ Benchmark Library
|
Benchmark phase metrics. More...
#include <phase_metrics.h>
Public Member Functions | |
PhaseMetrics () | |
Default constructor. More... | |
PhaseMetrics (const PhaseMetrics &)=default | |
PhaseMetrics (PhaseMetrics &&) noexcept=default | |
~PhaseMetrics () | |
PhaseMetrics & | operator= (const PhaseMetrics &)=default |
PhaseMetrics & | operator= (PhaseMetrics &&) noexcept=default |
bool | latency () const noexcept |
Is metrics contains latency values? More... | |
int64_t | min_latency () const noexcept |
Get latency minimal value of the phase execution. More... | |
int64_t | max_latency () const noexcept |
Get latency maximal value of the phase execution. More... | |
double | mean_latency () const noexcept |
Get latency mean value of the phase execution. More... | |
double | stdv_latency () const noexcept |
Get latency standard deviation of the phase execution. More... | |
int64_t | avg_time () const noexcept |
Get average time of the phase execution. More... | |
int64_t | min_time () const noexcept |
Get minimal time of the phase execution. More... | |
int64_t | max_time () const noexcept |
Get maximal time of the phase execution. More... | |
int64_t | total_time () const noexcept |
Get total time of the phase execution. More... | |
int64_t | total_operations () const noexcept |
Get total operations made in the phase. More... | |
int64_t | total_items () const noexcept |
Get total items processed in the phase. More... | |
int64_t | total_bytes () const noexcept |
Get total bytes processed in the phase. More... | |
int64_t | operations_per_second () const noexcept |
Get operations throughput (operations / second) More... | |
int64_t | items_per_second () const noexcept |
Get items throughput (items / second) More... | |
int64_t | bytes_per_second () const noexcept |
Get data throughput (bytes / second) More... | |
const std::map< std::string, int > & | custom_int () const noexcept |
Get custom integers map. More... | |
const std::map< std::string, unsigned > & | custom_uint () const noexcept |
Get custom unsigned integers map. More... | |
const std::map< std::string, int64_t > & | custom_int64 () const noexcept |
Get custom integers 64-bit map. More... | |
const std::map< std::string, uint64_t > & | custom_uint64 () const noexcept |
Get custom unsigned integers 64-bit map. More... | |
const std::map< std::string, float > & | custom_flt () const noexcept |
Get custom float map. More... | |
const std::map< std::string, double > & | custom_dbl () const noexcept |
Get custom doubles map. More... | |
const std::map< std::string, std::string > & | custom_str () const noexcept |
Get custom strings map. More... | |
int | threads () const noexcept |
void | AddOperations (int64_t operations) noexcept |
Increase operations count of the current phase. More... | |
void | AddItems (int64_t items) noexcept |
Register processed items in the current phase. More... | |
void | AddBytes (int64_t bytes) noexcept |
Register processed bytes in the current phase. More... | |
void | SetCustom (const std::string &name, int value) |
Set custom integer value. More... | |
void | SetCustom (const std::string &name, unsigned value) |
Set custom unsigned integer value. More... | |
void | SetCustom (const std::string &name, int64_t value) |
Set custom integer 64-bit value. More... | |
void | SetCustom (const std::string &name, uint64_t value) |
Set custom unsigned integer 64-bit value. More... | |
void | SetCustom (const std::string &name, float value) |
Set custom float value. More... | |
void | SetCustom (const std::string &name, double value) |
Set custom double value. More... | |
void | SetCustom (const std::string &name, const std::string &value) |
Set custom string value. More... | |
void | SetThreads (int threads) |
Set threads value. More... | |
void | AddLatency (int64_t latency) noexcept |
Add latency value of the current phase. More... | |
Friends | |
class | PhaseCore |
Benchmark phase metrics.
Provides interface of the phase metrics to collect benchmark running statistics:
If the phase metrics is accessed from benchmark running Context you can update some metrics values:
Definition at line 36 of file phase_metrics.h.
CppBenchmark::PhaseMetrics::PhaseMetrics | ( | ) |
Default constructor.
Definition at line 24 of file phase_metrics.cpp.
|
default |
|
defaultnoexcept |
CppBenchmark::PhaseMetrics::~PhaseMetrics | ( | ) |
Definition at line 29 of file phase_metrics.cpp.
|
inlinenoexcept |
Register processed bytes in the current phase.
bytes | - Bytes count |
Definition at line 117 of file phase_metrics.h.
|
inlinenoexcept |
Register processed items in the current phase.
items | - Items count |
Definition at line 111 of file phase_metrics.h.
|
noexcept |
Add latency value of the current phase.
latency | - Latency value |
Definition at line 127 of file phase_metrics.cpp.
|
inlinenoexcept |
Increase operations count of the current phase.
operations | - Operations count |
Definition at line 105 of file phase_metrics.h.
|
noexcept |
Get average time of the phase execution.
Definition at line 59 of file phase_metrics.cpp.
|
noexcept |
Get data throughput (bytes / second)
Definition at line 90 of file phase_metrics.cpp.
|
inlinenoexcept |
Get custom doubles map.
Definition at line 95 of file phase_metrics.h.
|
inlinenoexcept |
Get custom float map.
Definition at line 93 of file phase_metrics.h.
|
inlinenoexcept |
Get custom integers map.
Definition at line 85 of file phase_metrics.h.
|
inlinenoexcept |
Get custom integers 64-bit map.
Definition at line 89 of file phase_metrics.h.
|
inlinenoexcept |
Get custom strings map.
Definition at line 97 of file phase_metrics.h.
|
inlinenoexcept |
Get custom unsigned integers map.
Definition at line 87 of file phase_metrics.h.
|
inlinenoexcept |
Get custom unsigned integers 64-bit map.
Definition at line 91 of file phase_metrics.h.
|
noexcept |
Get items throughput (items / second)
Definition at line 82 of file phase_metrics.cpp.
|
noexcept |
Is metrics contains latency values?
Definition at line 34 of file phase_metrics.cpp.
|
noexcept |
Get latency maximal value of the phase execution.
Definition at line 44 of file phase_metrics.cpp.
|
noexcept |
Get maximal time of the phase execution.
Definition at line 69 of file phase_metrics.cpp.
|
noexcept |
Get latency mean value of the phase execution.
Definition at line 49 of file phase_metrics.cpp.
|
noexcept |
Get latency minimal value of the phase execution.
Definition at line 39 of file phase_metrics.cpp.
|
noexcept |
Get minimal time of the phase execution.
Definition at line 64 of file phase_metrics.cpp.
|
noexcept |
Get operations throughput (operations / second)
Definition at line 74 of file phase_metrics.cpp.
|
default |
|
defaultnoexcept |
|
inline |
Set custom string value.
name | - Name |
value | - Value |
Definition at line 167 of file phase_metrics.h.
|
inline |
Set custom double value.
name | - Name |
value | - Value |
Definition at line 160 of file phase_metrics.h.
|
inline |
Set custom float value.
name | - Name |
value | - Value |
Definition at line 153 of file phase_metrics.h.
|
inline |
Set custom integer value.
name | - Name |
value | - Value |
Definition at line 125 of file phase_metrics.h.
|
inline |
Set custom integer 64-bit value.
name | - Name |
value | - Value |
Definition at line 139 of file phase_metrics.h.
|
inline |
Set custom unsigned integer 64-bit value.
name | - Name |
value | - Value |
Definition at line 146 of file phase_metrics.h.
|
inline |
Set custom unsigned integer value.
name | - Name |
value | - Value |
Definition at line 132 of file phase_metrics.h.
|
inline |
|
noexcept |
Get latency standard deviation of the phase execution.
Definition at line 54 of file phase_metrics.cpp.
|
inlinenoexcept |
Definition at line 99 of file phase_metrics.h.
|
inlinenoexcept |
Get total bytes processed in the phase.
Definition at line 75 of file phase_metrics.h.
|
inlinenoexcept |
Get total items processed in the phase.
Definition at line 73 of file phase_metrics.h.
|
inlinenoexcept |
Get total operations made in the phase.
Definition at line 71 of file phase_metrics.h.
|
inlinenoexcept |
Get total time of the phase execution.
Definition at line 69 of file phase_metrics.h.
|
friend |
Definition at line 38 of file phase_metrics.h.