Documentation ¶
Overview ¶
package chunk encodes timeseries in chunks of data see devdocs/chunk-format.md for more information.
Index ¶
- Variables
- func ExtractChunkSpan(chunk []byte) uint32
- func MaxConfigurableSpan() uint32
- type Chunk
- type Format
- type IterGen
- func (z *IterGen) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *IterGen) EncodeMsg(en *msgp.Writer) (err error)
- func (ig IterGen) EndTs() uint32
- func (ig IterGen) Format() Format
- func (ig *IterGen) Get() (tsz.Iter, error)
- func (z *IterGen) MarshalMsg(b []byte) (o []byte, err error)
- func (z *IterGen) Msgsize() (s int)
- func (ig *IterGen) Size() uint64
- func (ig *IterGen) Span() uint32
- func (z *IterGen) UnmarshalMsg(bts []byte) (o []byte, err error)
- type IterGensAsc
- type SpanCode
Constants ¶
This section is empty.
Variables ¶
var ChunkSpans = [32]uint32{
1,
5,
10,
15,
20,
30,
60,
90,
2 * 60,
3 * 60,
5 * 60,
10 * 60,
15 * 60,
20 * 60,
30 * 60,
45 * 60,
3600,
90 * 60,
2 * 3600,
150 * 60,
3 * 3600,
4 * 3600,
5 * 3600,
6 * 3600,
7 * 3600,
8 * 3600,
9 * 3600,
10 * 3600,
12 * 3600,
15 * 3600,
18 * 3600,
24 * 3600,
}
var RevChunkSpans = make(map[uint32]SpanCode, len(ChunkSpans))
Functions ¶
func ExtractChunkSpan ¶ added in v0.13.0
SpanOfChunk takes a chunk and tries to determine its span. It returns 0 if it failed to determine the span, this could fail either because the given chunk is invalid or because it has an old format
func MaxConfigurableSpan ¶ added in v1.0.0
func MaxConfigurableSpan() uint32
MaxConfigurableSpan returns the largest configurable span.
Types ¶
type Chunk ¶
type Chunk struct { Series tsz.SeriesLong NumPoints uint32 First bool }
Chunk is a chunk of data. not concurrency safe. last check that the methods are being called safely by Dieter on 20/11/2018 checked: String, Push, Finish, Encode and properties Series, NumPoints, First for the most part, confirming serialized access is easy by tracking all callers/references. The main exception is the ChunkWriteRequest mechanism. any CWR created is processed asynchronously, and chunk properties will be read (the series.T0, chunk.Encode(), etc) But it can be proven that we only call NewChunkWriteRequest() on chunks that are no longer being modified.
type Format ¶
type Format uint8
type IterGen ¶
type IterGen struct { T0 uint32 IntervalHint uint32 // a hint wrt expected alignment of points. useful to recover delta overflows in tsz.Series4h, not used for other formats B []byte }
func NewIterGen ¶
NewIterGen creates an IterGen and performs crude validation of the data note: it's ok for intervalHint to be 0 or 1 to mean unknown. it just means that series4h corruptions can't be remediated in single-point-per-chunk scenarios
func (*IterGen) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type IterGensAsc ¶
type IterGensAsc []IterGen
func (IterGensAsc) Len ¶
func (a IterGensAsc) Len() int
func (IterGensAsc) Less ¶
func (a IterGensAsc) Less(i, j int) bool
func (IterGensAsc) Swap ¶
func (a IterGensAsc) Swap(i, j int)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package tsz implements time-series compression it is a fork of https://github.com/dgryski/go-tsz which implements http://www.vldb.org/pvldb/vol8/p1816-teller.pdf see devdocs/chunk-format.md for more info Package tsz implements time-series compression it is a fork of https://github.com/dgryski/go-tsz which implements http://www.vldb.org/pvldb/vol8/p1816-teller.pdf see devdocs/chunk-format.md for more info
|
Package tsz implements time-series compression it is a fork of https://github.com/dgryski/go-tsz which implements http://www.vldb.org/pvldb/vol8/p1816-teller.pdf see devdocs/chunk-format.md for more info Package tsz implements time-series compression it is a fork of https://github.com/dgryski/go-tsz which implements http://www.vldb.org/pvldb/vol8/p1816-teller.pdf see devdocs/chunk-format.md for more info |