Discover Packages
github.com/g8os/core0
apps
core0
stats
package
Version:
v1.4.1
Opens a new window with list of versions in this module.
Published: Jun 28, 2018
License: Apache-2.0
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation Source Files Index Constants Variables Functions Types NewLedisStatsAggregator(sink) type History type Operation type Point type Sample type Samples type State type Stats type Tags (m) Feed(value, now, duration) LoadState(data) NewState(op, durations) (s) Feed(value) (s) FeedOn(now, value) (t) Len() (t) Less(i, j) (t) Swap(i, j)
Documentation
¶
View Source
const (
StatisticsQueueKey = "statistics:%d"
StateKey = "state:%s:%s"
KeyIdSep = ":"
IDTag = "id"
)
type Sample struct {
Avg float64 `json:"avg"`
Total float64 `json:"total"`
Max float64 `json:"max"`
Count uint `json:"count"`
Start int64 `json:"start"`
}
Feed values on now, for the specific aggregate duration
type State struct {
Operation Operation `json:"op"`
LastValue float64 `json:"last_value"`
LastTime int64 `json:"last_time"`
Tags []pm .Tag `json:"tags,omitempty"`
Current Samples `json:"current"`
History History `json:"history"`
}
type Stats struct {
Operation Operation `json:"operation"`
Key string `json:"key"`
Value float64 `json:"value"`
Tags []pm .Tag `json:"tags"`
}
Less reports whether the element with
index i should sort before the element with index j.
Swap swaps the elements with indexes i and j.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.