Collect samples using a metrics collector.
Collect samples using a metrics collector.
(batch-size t0 batch-time-ns)Return batch-size for the given time estimate and batch execution-time.
Return batch-size for the given time estimate and batch execution-time.
(collect-arrays collector measured batch-size-obj num-samples)Take num-samples samples of measured using batch-size.
The collector is used to collect each sample.
This is memory allocation garbage free collection.
Return a data map with the collected metric arrays on the :samples key. This will need to be transformed to get the metrics data.
Take num-samples samples of measured using batch-size. The collector is used to collect each sample. This is memory allocation garbage free collection. Return a data map with the collected metric arrays on the :samples key. This will need to be transformed to get the metrics data.
(elapsed-time-min-estimate measured num-samples batch-size)Return an estimate for the execution elapsed-time of a measured.
Repeatedly times the invocation of the function and returns the minimum invocation time.
For quick functions limit execution count, while for slower functions limit total execution time. Limit evaluations to eval-budget, or elapsed time to time-budget-ns.
Return an estimate for the execution elapsed-time of a measured. Repeatedly times the invocation of the function and returns the minimum invocation time. For quick functions limit execution count, while for slower functions limit total execution time. Limit evaluations to eval-budget, or elapsed time to time-budget-ns.
(elapsed-time-point-estimate measured)Run measured for an initial estimate of the elapsed-time.
Returns an estimated execution elapsed-time in ns.
Run measured for an initial estimate of the elapsed-time. Returns an estimated execution elapsed-time in ns.
(force-gc! num-gcs)Force garbage collection and finalisers so that execution time associated with this is not incurred at another time. Up to max-attempts are run to clear all pending finalizers and free as much memory as possible.
Returns samples with GC execution time, total changes in memory, and in object finalizers pending.
Must be zero garbage sampling. Execution time is not critical.
Force garbage collection and finalisers so that execution time associated with this is not incurred at another time. Up to max-attempts are run to clear all pending finalizers and free as much memory as possible. Returns samples with GC execution time, total changes in memory, and in object finalizers pending. Must be zero garbage sampling. Execution time is not critical.
(force-gc-no-capture! num-gcs)Force garbage collection and finalisers so that execution time associated with this is not incurred at another time. Up to max-attempts are run to clear all pending finalizers and free as much memory as possible.
Force garbage collection and finalisers so that execution time associated with this is not incurred at another time. Up to max-attempts are run to clear all pending finalizers and free as much memory as possible.
(sample-maps->map-of-samples samples metrics-defs)Transform a sequence of sample maps into a map of typed arrays.
Takes a vector of sample maps (each containing metrics at various paths) and a metrics-defs configuration. Returns a map from metric path to a typed array wrapper (DoubleArray, LongArray, or ObjectArray) based on the metric type.
Transform a sequence of sample maps into a map of typed arrays. Takes a vector of sample maps (each containing metrics at various paths) and a metrics-defs configuration. Returns a map from metric path to a typed array wrapper (DoubleArray, LongArray, or ObjectArray) based on the metric type.
(throw-away-collection measured)The initial measured evaluation is always un-representative. This function throws it away, returning nil.
The initial measured evaluation is always un-representative. This function throws it away, returning nil.
(warmup collector measured num-samples batch-size)Run measured for the given number of collections to enable JIT compilation. Return a sampled map.
Run measured for the given number of collections to enable JIT compilation. Return a sampled map.
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 |