← All compilation units

Flyology_Debug.Gauges

Description

An independently owned sample of every gauge slot.

Clear

procedure Clear

Clear every gauge. Concurrent Set calls are ordered independently at each key and may therefore survive or precede that key's clear.

Gauge_Kind

type Gauge_Kind is (<>);

Gauge_Value_Type

type Gauge_Value_Type is private;

Is_Set

function Is_Set (Result : Snapshot; Gauge : Gauge_Kind) return Boolean

Report whether Result contains a value for Gauge.

Parameters
Result

Snapshot to inspect

Gauge

Typed gauge identity

Return value

True after a Set represented by Result

Now

function Now return Timestamp
Return value

Read

procedure Read (Result : out Snapshot)

Copy every gauge without clearing it. Concurrent updates may appear in this snapshot or the next one independently for each gauge key.

Parameters
Result

Snapshot replaced by the sampled gauge state

Set

procedure Set (Gauge : Gauge_Kind; Value : Gauge_Value_Type)

Timestamp and replace the persistent value of Gauge without allocation or I/O. Updating one gauge does not contend with other gauge keys.

Parameters
Gauge

Typed gauge identity

Value

Latest value copied into the gauge slot

Snapshot

type Snapshot is private;

An independently owned sample of every gauge slot.

Timestamp_Of

function Timestamp_Of (Result : Snapshot; Gauge : Gauge_Kind) return Timestamp

Return the producer timestamp sampled for Gauge.

Parameters
Result

Snapshot to inspect

Gauge

Typed gauge identity

Return value

Monotonic nanosecond timestamp for the latest sampled value

Raised exceptions
Constraint_Error

Gauge is not set in Result

Value_Of

function Value_Of (Result : Snapshot; Gauge : Gauge_Kind) return Gauge_Value_Type

Return the latest value sampled for Gauge.

Parameters
Result

Snapshot to inspect

Gauge

Typed gauge identity

Return value

Latest copied gauge value

Raised exceptions
Constraint_Error

Gauge is not set in Result