Module Mavryk_time_measurement_runtime.Measurement

This module defines the model of a measurement as well as its related pretty printers and encoders.

type label = string

The name of a measurement.

type metadata = string list

Some additional data that can be used to discrimine measurements.

type key = label * metadata

The key of a measurement is used to discriminate measurements. It is intended to be used as a search criteria if measurements are stored in a collection.

type value = float

The value of a measurement. It can actually represent both a duration or a timestamp.

type t = key * value
val create : 'a -> 'b -> 'c -> ('d * 'e) * 'f
val pp_list : Stdlib.Format.formatter -> (Stdlib.Format.formatter -> 'a -> unit) -> 'a list -> unit
val pp_metadata : Stdlib.Format.formatter -> string list -> unit
val pp_value : Stdlib.Format.formatter -> float -> unit
val pp_measurement : Stdlib.Format.formatter -> ((string * string list) * float) -> unit
val pp_measurements : Stdlib.Format.formatter -> ((string * string list) * float) list -> unit
val key_encoding : (string * string list) Data_encoding.encoding
val value_encoding : float Data_encoding.encoding
val measurement_encoding : ((string * string list) * float) Data_encoding.encoding
val measurements_encoding : ((string * string list) * float) list Data_encoding.encoding
val compare_keys : (Stdlib.String.t * Stdlib.String.t list) -> (Stdlib.String.t * Stdlib.String.t list) -> int