OxL Reference

method Histogram.observe

Records one observation.

Example:

oxl✓ checked in CI
use std.obs { metric }

fn main() io {
  let h = metric.histogram("docs_observe_seconds", "", [1.0, 10.0])
  h.observe(3.0)
  print("{h.count()}")
}
Output
1.0
pub(api) fn observe(v: f64) io

Complexity. O(buckets).

Since. 1.0.0-beta

Parameters

NameType
vf64

Effects

io

Defined in: std/obs/obs.oxl:742

See also