rrdtool

package
v0.0.0-...-365eaa3 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RRA1PointCnt   = 720 // 1m一个点存12h
	RRA5PointCnt   = 576 // 5m一个点存2d
	RRA20PointCnt  = 504 // 20m一个点存7d
	RRA180PointCnt = 766 // 3h一个点存3month
	RRA720PointCnt = 730 // 12h一个点存1year
)

RRA.Point.Size

Variables

View Source
var Counter uint64
View Source
var (
	Out_done_chan chan int
)

Functions

func Fetch

func Fetch(filename string, cf string, start, end int64, step int) ([]*cmodel.RRDData, error)

func Flush

func Flush(filename string, items []*cmodel.GraphItem) error

flush to disk from memory 最新的数据在列表的最后面 TODO fix me, filename fmt from item[0], it's hard to keep consistent

func FlushAll

func FlushAll()

func FlushRRD

func FlushRRD(idx int)

func Start

func Start()

Types

type RRDLocker

type RRDLocker struct {
	sync.Mutex
	M map[string]*sync.Mutex
}

RRD Files' Lock

var (
	L *RRDLocker = &RRDLocker{
		M: make(map[string]*sync.Mutex),
	}
)

func (*RRDLocker) GetLock

func (t *RRDLocker) GetLock(key string) *sync.Mutex

Jump to

Keyboard shortcuts

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