Liking cljdoc? Tell your friends :D

blocks.summary

A 'summary' represents a collection of blocks, including certain statistics about the aggregate count and sizes. These are useful for returning from certain operations to represent the set of blocks acted upon.

A 'summary' represents a collection of blocks, including certain statistics
about the aggregate count and sizes. These are useful for returning from
certain operations to represent the set of blocks acted upon.
raw docstring

bucket->rangeclj

(bucket->range n)

Returns a vector with the boundaries which a given size bucket covers.

Returns a vector with the boundaries which a given size bucket covers.
sourceraw docstring

initclj

(init)
(init expected-population false-positive-rate)

Return a new, empty summary. An optional expected population and error frequency may be passed in for more control. The following fields are present in a summary:

  • :count is the total number of blocks added to the summary
  • :size is the total size of blocks added to the summary, in bytes
  • :sizes gives a map from bucket exponent to a count of the blocks in that bucket (see size->bucket and bucket->range)
Return a new, empty summary. An optional expected population and error
frequency may be passed in for more control. The following fields are present
in a summary:

- `:count` is the total number of blocks added to the summary
- `:size` is the total size of blocks added to the summary, in bytes
- `:sizes` gives a map from bucket exponent to a count of the blocks in that
  bucket (see `size->bucket` and `bucket->range`)
sourceraw docstring

mergeclj

(merge a b)

Merge two storage summaries together.

Merge two storage summaries together.
sourceraw docstring

size->bucketclj

(size->bucket size)

Assigns a block size to an exponential histogram bucket. Given a size s, returns n such that 2^n <= s < 2^(n+1).

Assigns a block size to an exponential histogram bucket. Given a size `s`,
returns `n` such that `2^n <= s < 2^(n+1)`.
sourceraw docstring

updateclj

(update summary block)

Update the storage summary with the stats from the given block.

Update the storage summary with the stats from the given block.
sourceraw docstring

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

× close