chronon::observe::Counter
#include <LocalCounter.hpp>
Public Functions
| Name | |
|---|---|
| ~Counter() =default | |
| const std::string & | unit() const |
| void | reset() |
| Counter & | operator=(const Counter & ) =delete |
| Counter & | operator=(Counter && other) |
| Counter & | operator+=(uint64_t delta) |
| Counter & | operator++() |
| const std::string & | name() const |
| bool | isRegistered() const |
| CounterId | id() const |
| uint64_t | get() const |
| const std::string & | description() const |
| Counter(counter_detail::InternalConstructionTag , ObservableUnit * owner, std::string_view name, std::string_view description ="", std::string_view unit ="") | |
| Counter(const Counter & ) =delete | |
| Counter(Counter && other) |
Friends
| Name | |
|---|---|
| class | ObservableUnit |
Detailed Description
class chronon::observe::Counter;
Counter - Internal per-instance counter storage used by EventCounter and DerivedCounter.
Each unit instance has its own counter with separate values:
- Counter names include the unit's hierarchical path (e.g., "cpu0.alu0.ops")
- Fast increment path (~2-3ns) via direct context access
Output (CSV):
cycle,unit_name,counter_name,value
10000,cpu0.alu0,ops,2500
10000,cpu0.alu1,ops,2400
10000,cpu1.alu0,ops,2550
Public Functions Documentation
function ~Counter
~Counter() =default
function unit
inline const std::string & unit() const
function reset
inline void reset()
function operator=
Counter & operator=(
const Counter &
) =delete
function operator=
Counter & operator=(
Counter && other
)
function operator+=
inline Counter & operator+=(
uint64_t delta
)
function operator++
inline Counter & operator++()
function name
inline const std::string & name() const
function isRegistered
inline bool isRegistered() const
function id
inline CounterId id() const
function get
inline uint64_t get() const
function description
inline const std::string & description() const
function Counter
Counter(
counter_detail::InternalConstructionTag ,
ObservableUnit * owner,
std::string_view name,
std::string_view description ="",
std::string_view unit =""
)
function Counter
Counter(
const Counter &
) =delete
function Counter
Counter(
Counter && other
)
Friends
friend ObservableUnit
friend class ObservableUnit(
ObservableUnit
);
Updated on 2026-07-23 at 16:24:33 +0000