Copyright | (c) Josh Bohde 2015 |
---|---|
License | GPL-3 |
Maintainer | josh@joshbohde.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
A Haskell implementation of HdrHistogram. It allows storing counts of observed values within a range, while maintaining precision to a configurable number of significant digits.
- data Histogram config value count = Histogram {
- _config :: HistogramConfig value
- totalCount :: count
- counts :: Vector count
- empty :: forall config value count. (HasConfig config, Integral value, FiniteBits value, Unbox count, Integral count) => Histogram config value count
- fromConfig :: (Unbox count, Integral count) => Tagged c (HistogramConfig value) -> Histogram c value count
- record :: (Unbox count, Integral count, Integral value, FiniteBits value) => Histogram config value count -> value -> Histogram config value count
- recordValues :: (Unbox count, Integral count, Integral value, FiniteBits value) => Histogram config value count -> value -> count -> Histogram config value count
- data Range a = Range {}
- percentile :: (Integral value, Integral count, Unbox count, Bits value) => Histogram config value count -> Float -> Range value
- data Config lowest highest sig
- class HasConfig s
Histogram
data Histogram config value count Source #
A pure Histogram
Histogram | |
|
empty :: forall config value count. (HasConfig config, Integral value, FiniteBits value, Unbox count, Integral count) => Histogram config value count Source #
Construct a Histogram
.
fromConfig :: (Unbox count, Integral count) => Tagged c (HistogramConfig value) -> Histogram c value count Source #
Construct a Histogram
from the given HistogramConfig
. In this
case c
is a phantom type.
Writing
record :: (Unbox count, Integral count, Integral value, FiniteBits value) => Histogram config value count -> value -> Histogram config value count Source #
Record a single value to the Histogram
recordValues :: (Unbox count, Integral count, Integral value, FiniteBits value) => Histogram config value count -> value -> count -> Histogram config value count Source #
Record a multiple instances of a value value to the Histogram
Reading
:: (Integral value, Integral count, Unbox count, Bits value) | |
=> Histogram config value count | |
-> Float | The percentile in the range 0 to 100 |
-> Range value |
Calculate the Range
of values at the given percentile