tsz

package module
v0.0.0-...-03b7d79 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2018 License: BSD-2-Clause Imports: 6 Imported by: 12

README

go-tsz

Master Branch Master Build Status Master Coverage Status Go Report Card GoDoc

Description

Package tsz implement the Gorilla Time Series Databasetime-series compression as described in: http://www.vldb.org/pvldb/vol8/p1816-teller.pdf

Getting started

This application is written in Go language, please refer to the guides in https://golang.org for getting started.

This project include a Makefile that allows you to test and build the project with simple commands. To see all available options:

make help

Running all tests

Before committing the code, please check if it passes all tests using

make qa

Documentation

Overview

Package tsz implement time-series compression

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iter

type Iter struct {
	T0 uint32
	// contains filtered or unexported fields
}

Iter lets you iterate over a series. It is not concurrency-safe.

func NewIterator

func NewIterator(b []byte) (*Iter, error)

NewIterator for the series

func (*Iter) Err

func (it *Iter) Err() error

Err error at the current iterator position

func (*Iter) Next

func (it *Iter) Next() bool

Next iteration of the series iterator

func (*Iter) Values

func (it *Iter) Values() (uint32, float64)

Values at the current iterator position

type Series

type Series struct {
	sync.Mutex

	// TODO(dgryski): timestamps in the paper are uint64
	T0 uint32
	// contains filtered or unexported fields
}

Series is the basic series primitive you can concurrently put values, finish the stream, and create iterators

func New

func New(t0 uint32) *Series

New series

func (*Series) Bytes

func (s *Series) Bytes() []byte

Bytes value of the series stream

func (*Series) Finish

func (s *Series) Finish()

Finish the series by writing an end-of-stream record

func (*Series) Iter

func (s *Series) Iter() *Iter

Iter lets you iterate over a series. It is not concurrency-safe.

func (*Series) MarshalBinary

func (s *Series) MarshalBinary() ([]byte, error)

MarshalBinary implements the encoding.BinaryMarshaler interface

func (*Series) Push

func (s *Series) Push(t uint32, v float64)

Push a timestamp and value to the series

func (*Series) UnmarshalBinary

func (s *Series) UnmarshalBinary(b []byte) error

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL