Utility functions useful for micro benchmarks
Utility functions useful for micro benchmarks
(rand-str n)Returns a random base62 string of the given length.
Returns a random base62 string of the given length.
(ticker frequency & [reset])Returns a lazy sequence that generates values in the given frequency
;;; Will take 10 seconds to finish (doseq [_ (take 10000 (ticker 1000))] (do something))
Returns a lazy sequence that generates values in the given frequency ;;; Will take 10 seconds to finish (doseq [_ (take 10000 (ticker 1000))] (do something))
(with-thread-pool bindings & forms)bindings => [name execution-count-or-seqable :duration duration-in-seconds :threads num-threads :frequency submit-frequency]
Evaluates the forms multiple times or for each item in the sequence using a thread pool. If the number of threads is not specified, it is set to the number of available cores on the system.
bindings => [name execution-count-or-seqable
:duration duration-in-seconds
:threads num-threads
:frequency submit-frequency]
Evaluates the forms multiple times or for each item in the sequence using
a thread pool. If the number of threads is not specified, it is set to the
number of available cores on the system.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 |