RollingSummaryStats. Private ns, implementation detail.
RollingSummaryStats. Private ns, implementation detail.
(rolling-summary-stats)
(rolling-summary-stats {:keys [buffer-size buffer-init sstats-init merge-cb]
:or {buffer-size 100000.0}
:as opts})
EXPERIMENTAL, SUBJECT TO CHANGE! Returns a stateful RollingSummaryStats: (rss <num>) => Adds given number to internal buffer. (deref rss) => Flushes buffer if necessary, and returns a ?map of summary stats for all numbers ever added to rss: {:keys [n min max p25 ... p99 mean var mad]}.
Useful for summarizing any (possibly infinite) stream of numbers. Used by the Tufte profiling library, and the Carmine Redis library.
Options: :buffer-size - The maximum number of numbers that may be buffered before next (rss <num>) call will block to flush buffer and merge with any existing summary stats.
Larger buffers mean better performance and more
accurate stats, at the cost of more memory use.
:buffer-init - Initial buffer content, useful for persistent rss. :sstats-init - Initial summary stats, useful for persistent rss.
EXPERIMENTAL, SUBJECT TO CHANGE! Returns a stateful RollingSummaryStats: (rss <num>) => Adds given number to internal buffer. (deref rss) => Flushes buffer if necessary, and returns a ?map of summary stats for all numbers ever added to rss: {:keys [n min max p25 ... p99 mean var mad]}. Useful for summarizing any (possibly infinite) stream of numbers. Used by the Tufte profiling library, and the Carmine Redis library. Options: :buffer-size - The maximum number of numbers that may be buffered before next (rss <num>) call will block to flush buffer and merge with any existing summary stats. Larger buffers mean better performance and more accurate stats, at the cost of more memory use. :buffer-init - Initial buffer content, useful for persistent rss. :sstats-init - Initial summary stats, useful for persistent rss.
(rolling-summary-stats-fast buffer-size merge-cb)
Fastest possible rolling-summary-stats
for Tufte, etc.
Fastest possible `rolling-summary-stats` for Tufte, etc.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close