|
Uni20
Asynchronous tensor and runtime library.
|
Fixed-size coarse wall-duration collector indexed by an event enum. More...
#include <performance_measurements.hpp>
Public Member Functions | |
| auto | operator[] (Event event) const noexcept -> DurationStatistics const & |
| Return aggregate statistics for one event. | |
| void | record_duration (Event event, Duration duration) noexcept |
| Record one completed event duration. | |
| constexpr void | reset () noexcept |
| Clear every recorded statistic. | |
Static Public Attributes | |
| static constexpr std::size_t | event_count = EventCount |
| static constexpr MeasurementLevel | measurement_level = MeasurementLevel::coarse |
Fixed-size coarse wall-duration collector indexed by an event enum.
The collector is intentionally not thread-safe. Coarse instrumentation records operation-scale phase boundaries from their calling thread. Detailed concurrent work should first record into disjoint per-item slots and aggregate after the batch joins.
| Event | Enum or enum-like event identifier convertible to std::size_t. |
| EventCount | Number of valid event identifiers. |
|
inlinenoexcept |
Return aggregate statistics for one event.
event identifies an element of [0, EventCount). | event | Event identifier. |
|
inlinenoexcept |
Record one completed event duration.
event identifies an element of [0, EventCount). | event | Event identifier. |
| duration | Nonnegative elapsed duration to aggregate. |
|
inlineconstexprnoexcept |
Clear every recorded statistic.
|
staticconstexpr |
|
staticconstexpr |