package tiny_httpd

  1. Overview
  2. Docs

Registry for metrics.

type t

The registry contains a group of metrics

val create : unit -> t
val on_will_emit : t -> (unit -> unit) -> unit

on_will_emit registry f calls f() every time emit buf registry is called (before the metrics start being emitted). This is useful to update some metrics on demand.

val emit : Buffer.t -> t -> unit

Write metrics into the given buffer. The buffer will be cleared first thing.

val emit_str : t -> string
OCaml

Innovation. Community. Security.