lock-free, multi-producer-safe performance statistics collector.
More...
#include <statistics.hpp>
|
| using | Duration = typename ClockPolicy::Duration |
| |
| using | TimePoint = typename ClockPolicy::TimePoint |
| |
|
| | BasicStats (const std::string &name={}) |
| | create instance.
|
| |
| | BasicStats (const BasicStats &other)=delete |
| | copy constructor.
|
| |
| BasicStats & | operator= (const BasicStats &other)=delete |
| | copy assignment.
|
| |
| | BasicStats (BasicStats &&other)=delete |
| | move constructor.
|
| |
| BasicStats & | operator= (BasicStats &&other)=delete |
| | move assignment.
|
| |
| | ~BasicStats () noexcept |
| | destroy instance.
|
| |
| const std::string & | name () const noexcept |
| | get metric name.
|
| |
| TimePoint | start () const noexcept |
| | mark the beginning of a measured interval.
|
| |
| void | stop (TimePoint startTime) noexcept |
| | mark the end of a measured interval and update all aggregates.
|
| |
| void | reset () noexcept |
| | reset all accumulators to their initial state.
|
| |
| uint64_t | count () const noexcept |
| | total number of completed intervals.
|
| |
| Duration | last () const noexcept |
| | duration of the most recently completed interval.
|
| |
| Duration | min () const noexcept |
| | minimum duration observed across all completed intervals.
|
| |
| Duration | max () const noexcept |
| | maximum duration observed across all completed intervals.
|
| |
| std::chrono::duration< double, std::nano > | mean () const noexcept |
| | arithmetic mean of all completed intervals.
|
| |
| double | throughput () const noexcept |
| | operations per second.
|
| |
| Duration | percentile (double p) const noexcept |
| | compute the requested percentile from the HDR histogram.
|
| |
| int | mlock () const noexcept |
| | lock histogram memory in RAM.
|
| |
template<class ClockPolicy>
class join::BasicStats< ClockPolicy >
lock-free, multi-producer-safe performance statistics collector.
◆ Duration
template<class ClockPolicy >
| using join::BasicStats< ClockPolicy >::Duration = typename ClockPolicy::Duration |
◆ TimePoint
template<class ClockPolicy >
| using join::BasicStats< ClockPolicy >::TimePoint = typename ClockPolicy::TimePoint |
◆ BasicStats() [1/3]
template<class ClockPolicy >
create instance.
- Parameters
-
- Exceptions
-
| std::runtime_error | if the clock is not invariant. |
◆ BasicStats() [2/3]
template<class ClockPolicy >
copy constructor.
- Parameters
-
| other | other object to copy. |
◆ BasicStats() [3/3]
template<class ClockPolicy >
move constructor.
- Parameters
-
| other | other object to move. |
◆ ~BasicStats()
template<class ClockPolicy >
◆ count()
template<class ClockPolicy >
total number of completed intervals.
- Returns
- sample count.
◆ last()
template<class ClockPolicy >
duration of the most recently completed interval.
- Returns
- last measured duration.
◆ max()
template<class ClockPolicy >
maximum duration observed across all completed intervals.
- Returns
- maximum measured duration, or zero if no interval has been recorded.
◆ mean()
template<class ClockPolicy >
| std::chrono::duration< double, std::nano > join::BasicStats< ClockPolicy >::mean |
( |
| ) |
const |
|
inlinenoexcept |
arithmetic mean of all completed intervals.
- Returns
- mean measured duration, or zero if no interval has been recorded.
◆ min()
template<class ClockPolicy >
minimum duration observed across all completed intervals.
- Returns
- minimum measured duration, or zero if no interval has been recorded.
◆ mlock()
template<class ClockPolicy >
lock histogram memory in RAM.
- Returns
- 0 on success, -1 on failure.
◆ name()
template<class ClockPolicy >
get metric name.
- Returns
- metric name.
◆ operator=() [1/2]
template<class ClockPolicy >
move assignment.
- Parameters
-
| other | other object to move. |
- Returns
- a reference to the current object.
◆ operator=() [2/2]
template<class ClockPolicy >
copy assignment.
- Parameters
-
| other | other object to copy. |
- Returns
- a reference to the current object.
◆ percentile()
template<class ClockPolicy >
compute the requested percentile from the HDR histogram.
- Parameters
-
| p | percentile in [0.0, 100.0]. |
- Returns
- latency at the p-th percentile; zero if no samples have been recorded.
◆ reset()
template<class ClockPolicy >
reset all accumulators to their initial state.
◆ start()
template<class ClockPolicy >
mark the beginning of a measured interval.
- Returns
- time point to be passed to the matching stop() call.
◆ stop()
template<class ClockPolicy >
mark the end of a measured interval and update all aggregates.
- Parameters
-
| startTime | time point returned by the matching start() call. |
◆ throughput()
template<class ClockPolicy >
operations per second.
- Returns
- throughput in ops/s.
The documentation for this class was generated from the following files: