package octez-internal-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/octez-internal-libs.irmin/Irmin/Metrics/index.html
Module Irmin.Metrics
Source
Type 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
.
An extensible type to get the location of the definition.
update_mode
describes how the data will be handled by the update
function.
- Mutate: the value and the storage are not modified but the content of the value can be mutate.
- Replace f: apply f to the value and updates its content.
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.
update metrics mode
updates the metric by taking in consideration mode
to define how it acts on t
according to their specication.