Module Imandrakit_metrics.Counter

A counter, increasing monotonically

type 'a t
val create_int : string -> int t
val create_float : string -> float t
val set : 'a t -> 'a -> unit
val incr : int t -> unit
val incr_by : int t -> int -> unit

incr_by c n adds n to counter c.

  • raises Assert_failure

    if n < 0