Safe Haskell | None |
---|
- newtype Snapshot = Snapshot {}
- quantile :: Double -> Snapshot -> Double
- size :: Snapshot -> Int
- median :: Snapshot -> Double
- get75thPercentile :: Snapshot -> Double
- get95thPercentile :: Snapshot -> Double
- get98thPercentile :: Snapshot -> Double
- get99thPercentile :: Snapshot -> Double
- get999thPercentile :: Snapshot -> Double
- takeSnapshot :: PrimMonad m => MVector (PrimState m) Double -> m Snapshot
Documentation
A wrapper around a *sorted* vector intended for calculating quantile statistics.
Snapshot | |
|
quantile :: Double -> Snapshot -> DoubleSource
Calculate an arbitrary quantile value for a Snapshot. Values below zero or greater than one will be clamped to the range [0, 1]
get75thPercentile :: Snapshot -> DoubleSource
Calculate the 75th percentile of a Snapshot
get95thPercentile :: Snapshot -> DoubleSource
Calculate the 95th percentile of a Snapshot
get98thPercentile :: Snapshot -> DoubleSource
Calculate the 98th percentile of a Snapshot
get99thPercentile :: Snapshot -> DoubleSource
Calculate the 99th percentile of a Snapshot
get999thPercentile :: Snapshot -> DoubleSource
Calculate the 99.9th percentile of a Snapshot
takeSnapshot :: PrimMonad m => MVector (PrimState m) Double -> m SnapshotSource
A utility function for snapshotting data from an unsorted MVector of samples.
NB: this function uses unsafeFreeze under the hood, so be sure that the vector being snapshotted is not used after calling this function.