Thread-safe aggregate of independently timed operation samples.
More...
#include <StormByte/telemetry.hxx>
Thread-safe aggregate of independently timed operation samples.
Not a telemetry type and not inherited by leaves. Concurrent samples may share this Clock; each sample owns its own start time and completion is accumulated under the shared state lock. A Sample token itself has one owner and must not be accessed concurrently.
◆ Clock() [1/3]
| StormByte::Clock::Clock |
( |
| ) |
|
|
noexcept |
Construct zeroed shared clock state.
◆ Clock() [2/3]
| StormByte::Clock::Clock |
( |
const Clock & | | ) |
|
|
delete |
Copy constructor is deleted.
◆ Clock() [3/3]
| StormByte::Clock::Clock |
( |
Clock && | | ) |
|
|
noexcept |
Move constructor is defaulted.
◆ ~Clock()
| StormByte::Clock::~Clock |
( |
| ) |
|
|
noexcept |
◆ Count()
| std::uint64_t StormByte::Clock::Count |
( |
| ) |
const |
|
noexcept |
Number of completed samples.
- Returns
- Completed operation count.
◆ GetValues()
Read Count, Time and MeanDuration under one lock.
- Returns
- Coherent completed-sample snapshot. The durations are built in the caller.
◆ MeanDuration()
Mean duration across completed samples.
- Returns
- Average microseconds per operation, or 0 when Count() == 0. Built in the caller.
◆ Measure()
| Sample StormByte::Clock::Measure |
( |
| ) |
|
Start an independent interval sample.
- Returns
- Move-only token; Stop it explicitly or let its destructor record it.
◆ operator=() [1/2]
Move assignment is defaulted.
- Returns
- Reference to this clock.
◆ operator=() [2/2]
| Clock & StormByte::Clock::operator= |
( |
const Clock & | | ) |
|
|
delete |
Copy assignment is deleted.
- Returns
- Reference to this clock.
◆ Time()
Cumulative duration of completed samples.
- Returns
- Elapsed microseconds. Built in the caller.
The documentation for this class was generated from the following file: