Liking cljdoc? Tell your friends :D

taoensso.tukey.sstats

SummaryStats stuff. Private ns, implementation detail.

SummaryStats stuff.
Private ns, implementation detail.
raw docstring

ISummaryStatsBufferedclj/sprotocol

ssb-clearclj/s

(ssb-clear _)

Clears all internal state and returns nil.

Clears all internal state and returns nil.

ssb-derefclj/s

(ssb-deref _)
(ssb-deref _ flush-buffer?)

Returns current ?sstats.

Returns current ?sstats.

ssb-flushclj/s

(ssb-flush _)

Flushes internal buffer and returns newly merged sstats or nil.

Flushes internal buffer and returns newly merged sstats or nil.

ssb-pushclj/s

(ssb-push _ n)

Adds given num to internal buffer.

Adds given num to internal buffer.
source

summary-statsclj/s

(summary-stats nums)

Given a coll of numbers, returns a new mergeable ?SummaryStats with: (deref ss) => {:keys [n min max p25 ... p99 mean var mad]}

See also summary-stats-merge.

Given a coll of numbers, returns a new mergeable ?SummaryStats with:
(deref ss) => {:keys [n min max p25 ... p99 mean var mad]}

See also `summary-stats-merge`.
sourceraw docstring

summary-stats-bufferedclj/s

(summary-stats-buffered)
(summary-stats-buffered {:keys [buffer-size buffer-init sstats-init merge-cb]
                         :or {buffer-size 100000.0}
                         :as opts})

Returns a new stateful SummaryStatsBuffered with: (ssb <num>) => Adds given number to internal buffer. (deref ssb) => Flushes buffer if necessary, and returns a mergeable ?SummaryStats. Deref again to get a map of summary stats for all numbers ever added to ssb: {:keys [n min max p25 ... p99 mean var mad]}.

Useful for summarizing a (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 (ssb <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
             while buffering.

:buffer-init - Initial buffer content, useful for persistent ssb. :sstats-init - Initial summary stats, useful for persistent ssb.

Returns a new stateful SummaryStatsBuffered with:
  (ssb <num>) => Adds given number to internal buffer.
  (deref ssb) => Flushes buffer if necessary, and returns a mergeable
                 ?SummaryStats. Deref again to get a map of summary
                 stats for all numbers ever added to ssb:
                   {:keys [n min max p25 ... p99 mean var mad]}.

Useful for summarizing a (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 (ssb <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
                 while buffering.

  :buffer-init - Initial buffer content, useful for persistent ssb.
  :sstats-init - Initial summary stats,  useful for persistent ssb.
sourceraw docstring

summary-stats-buffered-fastclj/s

(summary-stats-buffered-fast buffer-size merge-cb)

Returns fastest possible SummaryStatsBuffered for Tufte, etc.

Returns fastest possible SummaryStatsBuffered for Tufte, etc.
sourceraw docstring

summary-stats-buffered?clj/s

(summary-stats-buffered? x)

Returns true iff given a SummaryStatsBuffered argument.

Returns true iff given a SummaryStatsBuffered argument.
sourceraw docstring

summary-stats-mergeclj/s

(summary-stats-merge ss1)
(summary-stats-merge ss1 ss2)

Given one or more SummaryStats, returns a new ?SummaryStats with: (summary-stats-merge (summary-stats nums1) (summary-stats nums2))

an approximatation of (summary-stats (merge nums1 nums2))

Useful when you want summary stats for a large coll of numbers for which it would be infeasible/expensive to keep all numbers for accurate merging.

Given one or more SummaryStats, returns a new ?SummaryStats with:
  (summary-stats-merge
     (summary-stats nums1)
     (summary-stats nums2))

  an approximatation of (summary-stats (merge nums1 nums2))

Useful when you want summary stats for a large coll of numbers for which
it would be infeasible/expensive to keep all numbers for accurate merging.
sourceraw docstring

summary-stats?clj/s

(summary-stats? x)

Returns true iff given a SummaryStats argument.

Returns true iff given a SummaryStats argument.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close