Metrics collector.
A metrics collector collects metrics associated with executing a measured.
A metrics collector is a pipeline is a pipeline with two stages. It collects metrics into and array with an element for each metric, without creating any allocation garbage. The array is then transformed into a map, keyed by metric id.
The collect-array function takes a measure, a measured state, and
an eval count. It returns an array of sample data. The array is
allocated once, and all objects allocated during sampling are recorded
in the array, in order to make the sample phase garbage free.
The pipeline transform takes the sample array, and returns a sample
map. The transform is free to create garbage.
A pipeline is specified via keywords, which specify sample metrics to be collecteds and a pipeline terminal function, which is responsible for actually calling the measured.
Each sample function can collect data before and after the measured's execution.
Metrics collector. A metrics collector collects metrics associated with executing a measured. A metrics collector is a pipeline is a pipeline with two stages. It collects metrics into and array with an element for each metric, without creating any allocation garbage. The array is then transformed into a map, keyed by metric id. The `collect-array` function takes a measure, a measured state, and an eval count. It returns an array of sample data. The array is allocated once, and all objects allocated during sampling are recorded in the array, in order to make the sample phase garbage free. The pipeline `transform` takes the sample array, and returns a sample map. The transform is free to create garbage. A pipeline is specified via keywords, which specify sample metrics to be collecteds and a pipeline terminal function, which is responsible for actually calling the measured. Each sample function can collect data before and after the measured's execution.
(collect collector measured measured-args eval-count)Collect metrics from measured, returning a metrics data map.
Convenience function.
Collect metrics from measured, returning a metrics data map. Convenience function.
(collect-array {:keys [f length] :as _collector}
measured
measured-args
eval-count)Collect a metrics array from measured, returning the array.
Runs the measured eval-count times.
Return an array with an element for the data collected by each metric in the collector pipeline.
Collect a metrics array from measured, returning the array. Runs the measured eval-count times. Return an array with an element for the data collected by each metric in the collector pipeline.
(collector collector-config)Build a metrics collector pipeline by specifying metric-ids.
Returns a collector map, containing pipeline phase functions, :f and :x, and :metrics-defs keys.
Build a metrics collector pipeline by specifying metric-ids. Returns a collector map, containing pipeline phase functions, :f and :x, and :metrics-defs keys.
(transform collector sample)Transform the collection array into a metrics data map. Return a map with a top level key for each metric in the collector.
Transform the collection array into a metrics data map. Return a map with a top level key for each metric in the collector.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |