Safe Haskell | None |
---|---|
Language | Haskell2010 |
A reservoir is the internal storage mechanism for a Histogram. It provides a generic way to store histogram values in a way that allows us to avoid the need to plumb the implementation type through anything that uses a reservoir.
- data Reservoir = Reservoir {
- reservoirClear :: !(NominalDiffTime -> s -> s)
- reservoirSize :: !(s -> Int)
- reservoirSnapshot :: !(s -> Snapshot)
- reservoirUpdate :: !(Double -> NominalDiffTime -> s -> s)
- reservoirState :: !s
- clear :: NominalDiffTime -> Reservoir -> Reservoir
- size :: Reservoir -> Int
- snapshot :: Reservoir -> Snapshot
- update :: Double -> NominalDiffTime -> Reservoir -> Reservoir
Documentation
Encapsulates the internal state of a reservoir implementation.
The two standard implementations are the ExponentiallyDecayingReservoir and the UniformReservoir.
Reservoir | |
|