Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IntsCodecAs ¶
IntsCodecAs returns an int slice codec with the specified precision and type.
Types ¶
type Int16s ¶
type Int16s []int16
Int16s represents a slice serialized in an unsafe, non portable manner.
func (*Int16s) GetBinaryCodec ¶
GetBinaryCodec retrieves a custom binary codec.
type Int32s ¶
type Int32s []int32
Int32s represents a slice serialized in an unsafe, non portable manner.
func (*Int32s) GetBinaryCodec ¶
GetBinaryCodec retrieves a custom binary codec.
type Int64s ¶
type Int64s []int64
Int64s represents a slice serialized in an unsafe, non portable manner.
func (*Int64s) GetBinaryCodec ¶
GetBinaryCodec retrieves a custom binary codec.
type TimeCounters ¶
type TimeCounters struct { Time []uint64 // Sorted timestamps compressed using delta-encoding Data []uint64 // Corresponding uint64 values }
TimeCounters represents a compressed time-series data where the value is itself an unsigned integer. This is particularly useful for counters.
func (*TimeCounters) Append ¶
func (ts *TimeCounters) Append(time, value uint64)
Append appends a new value into the time series.
func (*TimeCounters) GetBinaryCodec ¶
func (ts *TimeCounters) GetBinaryCodec() binary.Codec
GetBinaryCodec retrieves a custom binary codec.
func (*TimeCounters) Len ¶
func (ts *TimeCounters) Len() int
Len returns the length of the time-series
func (*TimeCounters) Less ¶
func (ts *TimeCounters) Less(i, j int) bool
Less compares two elements of the time series
func (*TimeCounters) Swap ¶
func (ts *TimeCounters) Swap(i, j int)
Swap swaps two elements of the time series
type TimeSeries ¶
type TimeSeries struct { Time []uint64 // Sorted timestamps compressed using delta-encoding Data []float64 // Corresponding float-64 values }
TimeSeries represents a compressed time-series data. The implementation is based on Gorilla paper (https://www.vldb.org/pvldb/vol8/p1816-teller.pdf), but instead of bit-weaving it is byte-aligned. If you are using this, consider using snappy compression on the output, as it will give a significantly better compression than simply marshaling the time-series using this binary encoder.
func (*TimeSeries) Append ¶
func (ts *TimeSeries) Append(time uint64, value float64)
Append appends a new value into the time series.
func (*TimeSeries) GetBinaryCodec ¶
func (ts *TimeSeries) GetBinaryCodec() binary.Codec
GetBinaryCodec retrieves a custom binary codec.
func (*TimeSeries) Less ¶
func (ts *TimeSeries) Less(i, j int) bool
Less compares two elements of the time series
func (*TimeSeries) Swap ¶
func (ts *TimeSeries) Swap(i, j int)
Swap swaps two elements of the time series
type Timestamps ¶
type Timestamps []uint64
Timestamps represents the slice of sorted timestamps
func (*Timestamps) GetBinaryCodec ¶
func (ts *Timestamps) GetBinaryCodec() binary.Codec
GetBinaryCodec retrieves a custom binary codec.
type Uint16s ¶
type Uint16s []uint16
Uint16s represents a slice serialized in an unsafe, non portable manner.
func (*Uint16s) GetBinaryCodec ¶
GetBinaryCodec retrieves a custom binary codec.
type Uint32s ¶
type Uint32s []uint32
Uint32s represents a slice serialized in an unsafe, non portable manner.
func (*Uint32s) GetBinaryCodec ¶
GetBinaryCodec retrieves a custom binary codec.
type Uint64s ¶
type Uint64s []uint64
Uint64s represents a slice serialized in an unsafe, non portable manner.
func (*Uint64s) GetBinaryCodec ¶
GetBinaryCodec retrieves a custom binary codec.