Time_measurement.MakeA time measurement tool that uses the given clock C to measure the time, stores resulting measurements inside the given state S and publishes stored measurements using the publisher P.
module S : State.S with type elt := Measurement.tmodule P : Publisher.Sval duration : Measurement.key -> (unit -> 'a) -> 'aduration key thunk mesures the time taken to run the given thunk, binds the resulting time measurement with the given key and stores it in the batch. It will then evaluate in the result of the thunk.
val duration_lwt : Measurement.key -> (unit -> 'a Lwt.t) -> 'a Lwt.tSame as duration, but waits for the thunk's resulting promise to be resolved in order to properly measure time when using Lwt.
val timestamp_pre : Measurement.key -> (unit -> 'a) -> 'atimestamp_pre key thunk mesures the current time, binds the resulting time measurement with the given key and stores it in the batch. It will then execute the given thunk and evaluates in its result.