Irmin.MetricsType agnostics mechanisms to manipulate metrics.
Metrics defines primitives to handle metrics inside of Irmin. Its purpose is to decouple the metrics type definition from the data manipulation.
A t can be modified in different ways, depending on the update_mode.
update_mode describes how the data will be handled by the update function.
It gives the possibility to handle the same metric in different ways.
v ~origin ~name ~initial_state repr create a new t. The origin can be set to give an hint about where the data are gathered. name is a name to describe this metrics. initial_state is the first value to store in the metric object. repr describes the type representation to allow serialization.
val update : 'a t -> 'a update_mode -> unitupdate metrics mode updates the metric by taking in consideration mode to define how it acts on t according to their specication.