hdr-histogram-0.1.0.0: Haskell implementation of High Dynamic Range (HDR) Histograms

Copyright(c) Josh Bohde 2015
LicenseGPL-3
Maintainerjosh@joshbohde.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Data.HdrHistogram

Contents

Description

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.

Synopsis

Histogram

data Histogram config value count Source #

A pure Histogram

Constructors

Histogram 

Fields

Instances

(Unbox count, Eq count, Eq value) => Eq (Histogram config value count) Source # 

Methods

(==) :: Histogram config value count -> Histogram config value count -> Bool #

(/=) :: Histogram config value count -> Histogram config value count -> Bool #

(Unbox count, Show count, Show value) => Show (Histogram config value count) Source # 

Methods

showsPrec :: Int -> Histogram config value count -> ShowS #

show :: Histogram config value count -> String #

showList :: [Histogram config value count] -> ShowS #

(HasConfig config, Integral value, FiniteBits value, Unbox count, Integral count) => Monoid (Histogram config value count) Source # 

Methods

mempty :: Histogram config value count #

mappend :: Histogram config value count -> Histogram config value count -> Histogram config value count #

mconcat :: [Histogram config value count] -> Histogram config value count #

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

data Range a Source #

A range of values between lower and upper

Constructors

Range 

Fields

Instances

Eq a => Eq (Range a) Source # 

Methods

(==) :: Range a -> Range a -> Bool #

(/=) :: Range a -> Range a -> Bool #

Show a => Show (Range a) Source # 

Methods

showsPrec :: Int -> Range a -> ShowS #

show :: Range a -> String #

showList :: [Range a] -> ShowS #

percentile Source #

Arguments

:: (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

Re-exports

data Config lowest highest sig Source #

Type-safe configuration for a Histogram

Instances

(KnownNat low, KnownNat high, KnownNat sig, HighLow low high, SigBounds sig) => HasConfig (Config low high sig) Source # 

Methods

getConfig :: (Integral a, FiniteBits a) => Proxy * (Config low high sig) -> HistogramConfig a Source #

class HasConfig s Source #

Typeclass to specify the types which can produce a HistogramConfig

Minimal complete definition

getConfig

Instances

(KnownNat low, KnownNat high, KnownNat sig, HighLow low high, SigBounds sig) => HasConfig (Config low high sig) Source # 

Methods

getConfig :: (Integral a, FiniteBits a) => Proxy * (Config low high sig) -> HistogramConfig a Source #