goat-1.0.0: Time Series Compression

Copyright(c) Daniel Lovasko 2016-2017
LicenseBSD3
MaintainerDaniel Lovasko <daniel.lovasko@gmail.com>
Stabilitystable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Codec.Goat

Description

Goat is a time series compression implementation in pure Haskell. It is heavily based on Facebook's Gorilla algorithm [1].

1
http://www.vldb.org/pvldb/vol8/p1816-teller.pdf

Synopsis

Documentation

data Story Source #

Representation of a time series object. The constructor arguments are as follows: * time window size * current time window number * times fluid * values fluid

Instances

Show Story Source #

Pretty-printing for the Story type.

Methods

showsPrec :: Int -> Story -> ShowS #

show :: Story -> String #

showList :: [Story] -> ShowS #

data TimeFrame Source #

Succinct representation of a list of time points. The constructor arguments are as follows: * first time point * second time point * number of valid bits * bits

Instances

Eq TimeFrame Source # 
Show TimeFrame Source #

Pretty-printing of the TimeFrame type.

Serialize TimeFrame Source #

Binary serialization of the TimeFrame type. All integers are using the big-endian byte order.

Frame Word32 TimeFrame Source #

Binding of Word32 and TimeFrame.

data ValueFrame Source #

Succinct representation of a list of value points. The constructor arguments are as follows: * first value * number of valid bits * bits

Instances

Eq ValueFrame Source # 
Show ValueFrame Source #

Pretty-printing of the ValueFrame type.

Serialize ValueFrame Source #

Binary serialization of the ValueFrame type. All integers are using the big-endian byte order.

Frame Float ValueFrame Source #

Binding of Float and ValueFrame.

storyAppend Source #

Arguments

:: Story

old story

-> (Word32, Float)

time & value

-> Maybe Story

new story

Add new time/value pair to the story. The function will return Nothing in case that the value was invalid (NaN or Infinity) or when the time was invalid with respect to previously added times (breaking the series monotonicity).

storyDump Source #

Arguments

:: Story

story

-> [(Word32, Float)]

times & values

Output a list of all time/value pairs stored in the story.

storyNew Source #

Arguments

:: Word32

time window size

-> Word32

current time window number

-> Story

new story

Create a new empty story. The ratio of raw/compressed sections is 12/74. These fields will be configurable in the future versions of the module.

storyQuery Source #

Arguments

:: Story

story

-> (Word32, Word32)

interval

-> [(Word32, Float)]

times & values

Query the story for time/value pairs within the specified time limit.

timeDecode Source #

Arguments

:: TimeFrame

succinct frame form

-> [Word32]

time points

Unpack time points from the succinct frame.

timeEncode Source #

Arguments

:: [Word32]

time points

-> TimeFrame

succinct frame form

Pack a list of _ascending_ time points into a succinct frame form.

valueDecode Source #

Arguments

:: ValueFrame

succinct frame form

-> [Float]

value points

Unpack value points from the succinct frame.

valueEncode Source #

Arguments

:: [Float]

value points

-> ValueFrame

succinct frame form

Encode a list of float values into a succinct value frame.