chronon
Namespaces
| Name |
|---|
| chronon::tree |
| chronon::sender |
| chronon::params |
| chronon::observe |
Classes
| Name | |
|---|---|
| class | chronon::VersionedRegister Lock-free ring buffer of (value, cycle) versions for lookahead-safe shared state. |
| class | chronon::Unit |
| class | chronon::TreeNode Hierarchical tree node with path-based addressing and parameter inheritance. |
| class | chronon::TimelineSpan Stateful helper for boolean occupancy/stall spans. |
| class | chronon::TimelineLane Occupancy lane group: hardware-shaped span and instant events. |
| class | chronon::TimelineGauge Push-model gauge with optional sample-on-change filtering. |
| class | chronon::TimelineCounter Deprecated push-model counter track: explicit samples on the Perfetto timeline. |
| class | chronon::TimelineCapacity Used/free capacity helper backed by two counter tracks. |
| class | chronon::TickableUnit |
| struct | chronon::TickSimulationConfig |
| class | chronon::TickSimulation |
| class | chronon::ThreadSafeRegistry |
| struct | chronon::TerminationRequest Context for a termination request: reason, exit code, cycle, unit, message. |
| class | chronon::TerminationController |
| class | chronon::StageReg N-pipe pipeline register with ping-pong slots and runtime write tracking. |
| class | chronon::StagePipeline Groups heterogeneous StageReg instances for batch lifecycle calls. |
| class | chronon::SimulationApp Unified entry point: CLI, YAML override handling, and observation lifecycle. |
| class | chronon::SenderSimulationBuilder Constructs simulations from YAML configuration in four phases. |
| class | chronon::SenderFactoryRegistry Thread-safe singleton registry of unit factories keyed by YAML type name. |
| class | chronon::PriorityArbiter Declarative N-pipe priority arbiter with overflow, bank-conflict, and idle-fill. |
| class | chronon::PortDirectory |
| class | chronon::PortBindingRegistry |
| class | chronon::PortBase |
| struct | chronon::PipelinePipe |
| class | chronon::PhasedTickableUnit |
| class | chronon::PhasedAutoRegisteredUnit AutoRegisteredUnit variant with automatic Phase0/Phase1 dispatch. |
| struct | chronon::Phase1 Phase tag for odd cycles; reads slot 1, writes slot 0. |
| struct | chronon::Phase0 Phase tag for even cycles; reads slot 0, writes slot 1. |
| class | chronon::ParameterSet Base for parameter sets backed by self-registering Param |
| class | chronon::ParamBase Type-erased interface for self-registering parameters. |
| class | chronon::Param Self-registering parameter that hooks into its owning ParameterSet. |
| class | chronon::OutPort |
| struct | chronon::ObservationStats Aggregated per-unit observation statistics. |
| class | chronon::ObservationContext Per-unit central context for counters, tracing, logging, and epochs. |
| struct | chronon::ObservationChannelStats Per-channel emit/drop counts. |
| class | chronon::ObservableUnit |
| class | chronon::InPort |
| class | chronon::ISenderFactory Type-erased factory interface for runtime unit creation by YAML type name. |
| struct | chronon::Flow |
| struct | chronon::EventNameRef Resolved event-name handle; obtain via "miss"_ev (or EventName<"miss">::ref()). |
| class | chronon::EventCounter Counter plus optional first-class timeline instant emission. |
| struct | chronon::DerivedCounterDef Transport struct carrying a derived-counter formula from unit to backend. |
| class | chronon::DerivedCounter Computed counter declared as a unit member alongside raw Counters. |
| class | chronon::Counter |
| class | chronon::Connection |
| class | chronon::CategoryRegistry Global registry that auto-assigns bit positions for user trace categories. |
| class | chronon::Category Trace category with automatic bit-position assignment at startup. |
| class | chronon::AutoRegisteredUnit CRTP base that auto-registers Derived with SenderFactoryRegistry at program load. |
| struct | chronon::ArbWinner Winning request on a pipe; bank_conflict marks a priority win blocked by a conflict. |
| struct | chronon::ArbResult Per-tick arbitration result: winners by pipe, losers, and request counts. |
| struct | chronon::ArbRequest A single arbitration request for one source on one pipe. |
| struct | chronon::ArbLoser A losing request with the reason it was rejected. |
Types
| Name | |
|---|---|
| enum class | UnitState { } |
| enum class | TerminationReason { } Why the simulation is being terminated. |
| template <typename T > using StageReg< T, 1 > | SingleStageReg |
| using sender::TickSimulationConfig | SimulationConfig |
| using sender::config::SenderSimulationBuilder | SimulationBuilder |
| using sender::TickSimulation | Simulation |
| enum class | PortPolicy { } |
| enum class | ObservationChannel { } Identifies the observation channel for per-unit stats tracking. |
| enum class | LoseReason { } |
| enum class | LogLevel { } |
| using sender::factory::SenderFactoryRegistry | FactoryRegistry |
| enum class | CounterId { } Strongly typed counter identifier; indexes into the counter storage array. |
| using std::function< double(std::span< const uint64_t >)> | ComputeFn |
| enum class | BankConflictPriority { } |
Functions
| Name | |
|---|---|
| uint32_t | toIndex(CounterId id) |
| template <FixedString Track,typename Unit > void | spanEnd(Unit & unit) |
| template <FixedString Track,typename Unit ,typename Cat ,typename... Items> void | spanBegin(Unit & unit, Cat category, EventNameRef name, Items &&... items) Begin/end named occupancy spans without declaring a TimelineLane member. |
| template <ValidPhase P,std::size_t N,typename Src ,typename Dst > void | simpleForwardAll(Src & src, Dst & dst) Forward all pipes from src to dst with stall-aware retention. |
| template <ValidPhase P,typename Src ,typename Dst > bool | simpleForward(Src & src, Dst & dst, std::size_t pipe) |
| template <ValidPhase P,typename Src ,typename Dst ,typename Fn > bool | processForward(Src & src, Dst & dst, std::size_t pipe, Fn && fn) |
| template <FixedString Name,typename Unit ,typename Port > void | portRemaining(Unit & unit, const Port & port, std::string_view unit_name ="sends") |
| template <FixedString Name,typename Unit ,typename Port > void | portAvailable(Unit & unit, const Port & port, std::string_view unit_name ="entries") |
| template <uint16_t Pipe,FixedString Stage,typename Cat ,typename... Items> void | pipeStageHex(ObservationContext * ctx, Cat category, uint64_t id, Items &&... items) |
| template <uint16_t Pipe,FixedString Stage,typename Cat ,typename... Items> void | pipeStage(ObservationContext * ctx, Cat category, uint64_t id, Items &&... items) |
| template <uint16_t Pipe> PipelinePipe< Pipe > | pipe() |
| template <FixedString Track,typename Unit ,typename Cat ,typename... Items> void | instant(Unit & unit, Cat category, EventNameRef name, Items &&... items) Emit an instant event on a named track. |
| template <FixedString Name,typename Unit ,typename T > void | gauge(Unit & unit, T value, std::string_view unit_name ={}) Emit one push-model counter sample on a named Perfetto counter track. |
| Flow | flow(uint64_t id) |
| template <FixedString Name,typename Unit ,typename Cat ,typename... Items> void | event(Unit & unit, Cat category, Items &&... items) Emit a low-cardinality instant event on the unit's shared "events" track. |
| void | cpuPause() |
| template <ValidPhase P,typename Src ,typename Dst ,typename Convert > bool | convertForward(Src & src, Dst & dst, std::size_t pipe, Convert && convert) |
| template <FixedString Name,typename Unit ,typename Used ,typename Capacity > void | capacity(Unit & unit, Used used, Capacity total, std::string_view unit_name ={}) Emit used/free capacity samples on sibling counter tracks. |
| template <FixedString Key,typename T > TypedArg< T > | arg(T value) |
Types Documentation
enum UnitState
| Enumerator | Value | Description |
|---|
enum TerminationReason
| Enumerator | Value | Description |
|---|
Why the simulation is being terminated.
using SingleStageReg
template <typename T >
using chronon::sender::SingleStageReg = StageReg<T, 1>;
using SimulationConfig
using chronon::SimulationConfig = sender::TickSimulationConfig;
using SimulationBuilder
using chronon::SimulationBuilder = sender::config::SenderSimulationBuilder;
using Simulation
using chronon::Simulation = sender::TickSimulation;
enum PortPolicy
| Enumerator | Value | Description |
|---|
PortPolicy - Selects InPort cancellation/dispatch behavior.
- LegacyFastPath (default): legacy behavior. cancelYoungerThan/cancelOlderThan use the receiver-side generation/min-key/max-key bound mechanism. The sender path (enqueueStored_, pushFromThread) early-rejects messages that already look canceled. This is the backward-compatible default. Carries the known #7 overlapping-flush gap and #8 generation race in parallel mode; new code that needs strong cancellation guarantees should use StageSelective.
- StageSelective: optimized for delay=1 stage-register ports with selective cancellation. Each message carries
enqueue_cycle(producer's localCycle at push time). cancelYoungerThan(key) installs a StagePredicate {flush_cycle = receiver localCycle, max_keep = key}; predicates are stored in a small fixed-size slot array and retired when the receiver advances past flush_cycle. The sender side does NOT consult receiver state — the filter is applied receiver-side only on pop. This eliminates the cross-thread receiver-atomic read that races in parallel mode (#8) and the overlapping-flush zombie escape (#7).
enum ObservationChannel
| Enumerator | Value | Description |
|---|
Identifies the observation channel for per-unit stats tracking.
enum LoseReason
| Enumerator | Value | Description |
|---|
enum LogLevel
| Enumerator | Value | Description |
|---|
using FactoryRegistry
using chronon::FactoryRegistry = sender::factory::SenderFactoryRegistry;
enum CounterId
| Enumerator | Value | Description |
|---|
Strongly typed counter identifier; indexes into the counter storage array.
using ComputeFn
using chronon::observe::ComputeFn = std::function<double(std::span<const uint64_t>)>;
Receives snapshotted delta values for each source counter (declaration order) and returns the derived value. Invoked on the backend thread at CSV dump time.
enum BankConflictPriority
| Enumerator | Value | Description |
|---|
Functions Documentation
function toIndex
uint32_t toIndex(
CounterId id
)
function spanEnd
template <FixedString Track,
typename Unit >
inline void spanEnd(
Unit & unit
)
function spanBegin
template <FixedString Track,
typename Unit ,
typename Cat ,
typename... Items>
inline void spanBegin(
Unit & unit,
Cat category,
EventNameRef name,
Items &&... items
)
Begin/end named occupancy spans without declaring a TimelineLane member.
function simpleForwardAll
template <ValidPhase P,
std::size_t N,
typename Src ,
typename Dst >
void simpleForwardAll(
Src & src,
Dst & dst
)
Forward all pipes from src to dst with stall-aware retention.
function simpleForward
template <ValidPhase P,
typename Src ,
typename Dst >
bool simpleForward(
Src & src,
Dst & dst,
std::size_t pipe
)
Simple stall-aware forward for a single pipe. If dst already has a write pending for this pipe, retains in src. Returns true if forwarded, false if retained (stalled).
function processForward
template <ValidPhase P,
typename Src ,
typename Dst ,
typename Fn >
bool processForward(
Src & src,
Dst & dst,
std::size_t pipe,
Fn && fn
)
Forward with processing: fn(pipe, data&) called on consumed data before writing to dst. Returns true if forwarded, false if stalled.
function portRemaining
template <FixedString Name,
typename Unit ,
typename Port >
inline void portRemaining(
Unit & unit,
const Port & port,
std::string_view unit_name ="sends"
)
function portAvailable
template <FixedString Name,
typename Unit ,
typename Port >
inline void portAvailable(
Unit & unit,
const Port & port,
std::string_view unit_name ="entries"
)
function pipeStageHex
template <uint16_t Pipe,
FixedString Stage,
typename Cat ,
typename... Items>
inline void pipeStageHex(
ObservationContext * ctx,
Cat category,
uint64_t id,
Items &&... items
)
function pipeStage
template <uint16_t Pipe,
FixedString Stage,
typename Cat ,
typename... Items>
inline void pipeStage(
ObservationContext * ctx,
Cat category,
uint64_t id,
Items &&... items
)
function pipe
template <uint16_t Pipe>
PipelinePipe< Pipe > pipe()
function instant
template <FixedString Track,
typename Unit ,
typename Cat ,
typename... Items>
inline void instant(
Unit & unit,
Cat category,
EventNameRef name,
Items &&... items
)
Emit an instant event on a named track.
function gauge
template <FixedString Name,
typename Unit ,
typename T >
inline void gauge(
Unit & unit,
T value,
std::string_view unit_name ={}
)
Emit one push-model counter sample on a named Perfetto counter track.
function flow
inline Flow flow(
uint64_t id
)
function event
template <FixedString Name,
typename Unit ,
typename Cat ,
typename... Items>
inline void event(
Unit & unit,
Cat category,
Items &&... items
)
Emit a low-cardinality instant event on the unit's shared "events" track.
The event name is a compile-time literal and details are typed annotations: observe::event<"flush">(*this, CAT, arg<"removed">(n)).
function cpuPause
inline void cpuPause()
function convertForward
template <ValidPhase P,
typename Src ,
typename Dst ,
typename Convert >
bool convertForward(
Src & src,
Dst & dst,
std::size_t pipe,
Convert && convert
)
Cross-type forward: convert(pipe, src_data) returns dst_data. Returns true if forwarded, false if stalled.
function capacity
template <FixedString Name,
typename Unit ,
typename Used ,
typename Capacity >
inline void capacity(
Unit & unit,
Used used,
Capacity total,
std::string_view unit_name ={}
)
Emit used/free capacity samples on sibling counter tracks.
function arg
template <FixedString Key,
typename T >
inline TypedArg< T > arg(
T value
)
Updated on 2026-07-06 at 09:03:33 +0000