mx.interware.caudal.core.folds

fold

(fold fld-key reduction-fn events)(fold reduction-fn events)

intern-apply-fn

(intern-apply-fn apply-fn fld-key events)(intern-apply-fn apply-fn events)

max

(max fld-key events)(max events)

mean

(mean fld-key events)(mean events)

mean&std-dev

(mean&std-dev metric-key mean-key variance-key stdev-key count-key events)

Este fold revibe un vector de eventos, selecciona los eventos cuyo ‘metric-key’ es numérico, luego calcula el promedio y la desvuación estandar, regresa el primer evento de la coleccion’events’ asociando ‘mean-key’ con el promedio, ‘stdev-key’ con la desviación estandar y ‘count-key’ con el número de eventos con métrica numérica

mean&stddev-welford

(mean&stddev-welford metric-key mean-key sum-of-squares-key variance-key stdev-key count-key events)

This fold computes mean, stdev and variance using welford method

min

(min fld-key events)(min events)

non-nil-fld

(non-nil-fld fld-key events)

simple-mean&stdev

(simple-mean&stdev metrics)

sum

(sum fld-key events)(sum events)

with-numeric-fld

(with-numeric-fld fld-key events)