gossamer/performance

Access to the runtime’s high-resolution performance timeline — monotonic timestamps, named marks, and span measurements.

Recording lives in the per-kind submodules:

See Performance on MDN.

Values

pub fn clear_marks() -> Nil

Removes all mark entries from the performance timeline.

pub fn clear_marks_by_name(name: String) -> Nil

Removes the mark entries whose name matches name from the performance timeline.

pub fn clear_measures() -> Nil

Removes all measure entries from the performance timeline.

pub fn clear_measures_by_name(name: String) -> Nil

Removes the measure entries whose name matches name from the performance timeline.

pub fn entries() -> List(performance_entry.PerformanceEntry)

Returns every entry on the performance timeline.

pub fn entries_by_kind(
  kind: performance_entry.Kind,
) -> List(performance_entry.PerformanceEntry)

Returns the entries on the performance timeline whose kind matches kind. For kinds with a dedicated submodule, prefer the typed helper (e.g., gossamer/performance/mark.entries) which returns the typed record directly.

pub fn entries_by_name(
  name: String,
) -> List(performance_entry.PerformanceEntry)

Returns the entries on the performance timeline whose name matches name.

pub fn now() -> duration.Duration

Returns the high-resolution elapsed time since time_origin, monotonically non-decreasing within the execution context. Pair with time_origin to recover an absolute Timestamp, or subtract two now values via duration.difference to measure elapsed time.

pub fn time_origin() -> timestamp.Timestamp

Returns the time origin — the absolute reference point all performance timestamps are measured from.

Search Document