OxL Reference

method Gauge.add

Adds n (may be negative).

Example:

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

fn main() io {
  let g = metric.gauge("docs_gauge_add")
  g.add(10.0)
  g.add(-4.0)
  print("{g.value()}")
}
Output
6.0
pub(api) fn add(n: f64) io

Complexity. O(1).

Since. 1.0.0-beta

Parameters

NameType
nf64

Effects

io

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

See also