package irmin-bench
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=09996fbcc2c43e117a9bd8e9028c635e81cccb264d5e02d425ab8b06bbacdbdb
sha512=0391a6bf7b94a1edd50a3a8df9e58961739fa78d7d689d61f56bc87144483bad2ee539df595c33d9d52c29b3458da5dddf3a73b5eb85e49c4667c26d2cd46be1
doc/irmin-bench.traces/Irmin_traces/Trace_stat_summary_utils/index.html
Module Irmin_traces.Trace_stat_summary_utilsSource
Utilities to summarise data.
This file is NOT meant to be used from Tezos, as opposed to some other "trace_*" files.
snap_to_integer ~significant_digits v is Float.round v if v is close to Float.round v, otherwise the result is v. significant_digits defines how close things are.
Examples:
When significant_digits is 4 and v is 42.00001, snap_to_integer v is 42..
When significant_digits is 4 and v is 42.001, snap_to_integer v is v.
val create_pp_real :
?significant_digits:int ->
float list ->
Format.formatter ->
float ->
unitcreate_pp_real examples is pp_real, a float pretty-printer that adapts to the examples shown to it.
It is highly recommended, but not mandatory, for all the numbers passed to pp_real to be included in examples.
When all the examples are integers, the display may be different. The examples that aren't integer, but that are very close to be a integers are counted as integers. significant_digits is used internally to snap the examples to integers.
create_pp_seconds examples is pp_seconds, a time span pretty-printer that adapts to the examples shown to it.
It is highly recommended, but not mandatory, for all the numbers passed to pp_seconds to be included in examples.
Pretty prints a percent in a way that always takes 4 chars.
Examples: 0. is " 0%", 0.00001 is "0.0%", 0.003 is "0.3%", 0.15 is " 15%", 9.0 is 900%, 700. is 700x, 410_000.0 is "4e6x" and 1e100 is "++++".
Negative inputs are undefined.
Functional Exponential Moving Average (EMA).
Functional summary for a variable that has zero or more occurences per period. accumulate is expected to be called in_period_count times before finalise is.
See Trace_stat_summary for an explanation and an example.