| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Database.Redis.ManualCommands.Tdigest
Synopsis
- data TDigestCreateOpts = TDigestCreateOpts {}
- defaultTDigestCreateOpts :: TDigestCreateOpts
- data TDigestMergeOpts = TDigestMergeOpts {}
- defaultTDigestMergeOpts :: TDigestMergeOpts
- data TDigestInfo = TDigestInfo {
- tdigestInfoCompression :: Integer
- tdigestInfoCapacity :: Integer
- tdigestInfoMergedNodes :: Integer
- tdigestInfoUnmergedNodes :: Integer
- tdigestInfoMergedWeight :: Integer
- tdigestInfoUnmergedWeight :: Integer
- tdigestInfoObservations :: Integer
- tdigestInfoTotalCompressions :: Integer
- tdigestInfoMemoryUsage :: Integer
- tdigestCreateOptsToArgs :: TDigestCreateOpts -> [ByteString]
- tdigestMergeOptsToArgs :: TDigestMergeOpts -> [ByteString]
- tdigestAdd :: RedisCtx m f => ByteString -> NonEmpty Double -> m (f Status)
- tdigestByrank :: RedisCtx m f => ByteString -> NonEmpty Integer -> m (f [Double])
- tdigestByrevrank :: RedisCtx m f => ByteString -> NonEmpty Integer -> m (f [Double])
- tdigestCdf :: RedisCtx m f => ByteString -> NonEmpty Double -> m (f [Double])
- tdigestCreate :: RedisCtx m f => ByteString -> m (f Status)
- tdigestCreateOpts :: RedisCtx m f => ByteString -> TDigestCreateOpts -> m (f Status)
- tdigestInfo :: RedisCtx m f => ByteString -> m (f TDigestInfo)
- tdigestMax :: RedisCtx m f => ByteString -> m (f Double)
- tdigestMerge :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Status)
- tdigestMergeOpts :: RedisCtx m f => ByteString -> NonEmpty ByteString -> TDigestMergeOpts -> m (f Status)
- tdigestMin :: RedisCtx m f => ByteString -> m (f Double)
- tdigestQuantile :: RedisCtx m f => ByteString -> NonEmpty Double -> m (f [Double])
- tdigestRank :: RedisCtx m f => ByteString -> NonEmpty Double -> m (f [Integer])
- tdigestReset :: RedisCtx m f => ByteString -> m (f Status)
- tdigestRevrank :: RedisCtx m f => ByteString -> NonEmpty Double -> m (f [Integer])
- tdigestTrimmedMean :: RedisCtx m f => ByteString -> Double -> Double -> m (f Double)
Documentation
data TDigestCreateOpts Source #
Constructors
| TDigestCreateOpts | |
Fields
| |
Instances
| Show TDigestCreateOpts Source # | |
Defined in Database.Redis.ManualCommands.Tdigest Methods showsPrec :: Int -> TDigestCreateOpts -> ShowS # show :: TDigestCreateOpts -> String # showList :: [TDigestCreateOpts] -> ShowS # | |
| Eq TDigestCreateOpts Source # | |
Defined in Database.Redis.ManualCommands.Tdigest Methods (==) :: TDigestCreateOpts -> TDigestCreateOpts -> Bool # (/=) :: TDigestCreateOpts -> TDigestCreateOpts -> Bool # | |
data TDigestMergeOpts Source #
Constructors
| TDigestMergeOpts | |
Fields
| |
Instances
| Show TDigestMergeOpts Source # | |
Defined in Database.Redis.ManualCommands.Tdigest Methods showsPrec :: Int -> TDigestMergeOpts -> ShowS # show :: TDigestMergeOpts -> String # showList :: [TDigestMergeOpts] -> ShowS # | |
| Eq TDigestMergeOpts Source # | |
Defined in Database.Redis.ManualCommands.Tdigest Methods (==) :: TDigestMergeOpts -> TDigestMergeOpts -> Bool # (/=) :: TDigestMergeOpts -> TDigestMergeOpts -> Bool # | |
data TDigestInfo Source #
Constructors
| TDigestInfo | |
Fields
| |
Instances
| Show TDigestInfo Source # | |
Defined in Database.Redis.ManualCommands.Tdigest Methods showsPrec :: Int -> TDigestInfo -> ShowS # show :: TDigestInfo -> String # showList :: [TDigestInfo] -> ShowS # | |
| Eq TDigestInfo Source # | |
Defined in Database.Redis.ManualCommands.Tdigest | |
| RedisResult TDigestInfo Source # | |
Defined in Database.Redis.ManualCommands.Tdigest | |
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> NonEmpty Double | Observations to add. |
| -> m (f Status) |
Adds one or more observations to a t-digest sketch (https://redis.io/commands/tdigest.add).
O(n log k), where n is the number of observations and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> NonEmpty Integer | Requested ranks. |
| -> m (f [Double]) |
Returns observations by their ascending ranks from a t-digest sketch (https://redis.io/commands/tdigest.byrank).
O(n log k), where n is the number of requested ranks and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> NonEmpty Integer | Requested reverse ranks. |
| -> m (f [Double]) |
Returns observations by their descending ranks from a t-digest sketch (https://redis.io/commands/tdigest.byrevrank).
O(n log k), where n is the number of requested reverse ranks and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> NonEmpty Double | Observations to query. |
| -> m (f [Double]) |
Returns cumulative distribution estimates for one or more observations (https://redis.io/commands/tdigest.cdf).
O(n log k), where n is the number of queried values and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch to create. |
| -> m (f Status) |
Creates an empty t-digest sketch (https://redis.io/commands/tdigest.create).
O(1)
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch to create. |
| -> TDigestCreateOpts | Creation options. |
| -> m (f Status) |
Creates an empty t-digest sketch (https://redis.io/commands/tdigest.create).
O(1)
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> m (f TDigestInfo) |
Returns information about a t-digest sketch (https://redis.io/commands/tdigest.info).
O(1)
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> m (f Double) |
Returns the maximum observation in a t-digest sketch (https://redis.io/commands/tdigest.max).
O(1)
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Destination key. |
| -> NonEmpty ByteString | Source sketch keys. |
| -> m (f Status) |
Merges multiple t-digest sketches into a destination sketch (https://redis.io/commands/tdigest.merge).
O(n cdot k), where n is the number of source sketches and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Destination key. |
| -> NonEmpty ByteString | Source sketch keys. |
| -> TDigestMergeOpts | Merge options. |
| -> m (f Status) |
Merges multiple t-digest sketches into a destination sketch (https://redis.io/commands/tdigest.merge).
O(n cdot k), where n is the number of source sketches and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> m (f Double) |
Returns the minimum observation in a t-digest sketch (https://redis.io/commands/tdigest.min).
O(1)
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> NonEmpty Double | Quantiles to estimate. |
| -> m (f [Double]) |
Returns quantile estimates for one or more quantiles (https://redis.io/commands/tdigest.quantile).
O(n log k), where n is the number of quantiles and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> NonEmpty Double | Observations to rank. |
| -> m (f [Integer]) |
Returns ascending rank estimates for one or more observations (https://redis.io/commands/tdigest.rank).
O(n log k), where n is the number of observations and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> m (f Status) |
Resets a t-digest sketch to its empty state (https://redis.io/commands/tdigest.reset).
O(1)
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> NonEmpty Double | Observations to rank. |
| -> m (f [Integer]) |
Returns descending rank estimates for one or more observations (https://redis.io/commands/tdigest.revrank).
O(n log k), where n is the number of observations and k is the compression parameter.
Since RedisBloom 2.4.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the t-digest sketch. |
| -> Double | Lower quantile bound. |
| -> Double | Upper quantile bound. |
| -> m (f Double) |
Returns the trimmed mean for observations within the provided quantile range (https://redis.io/commands/tdigest.trimmed_mean).
O(log k), where k is the compression parameter.
Since RedisBloom 2.4.0