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.
(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.
(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`)
(merge a b)
Merge two storage summaries together.
Merge two storage summaries together.
(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)`.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close