quantile

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type E2eProcessingLatencyAggregate

type E2eProcessingLatencyAggregate struct {
	Count       int                  `json:"count"`
	Percentiles []map[string]float64 `json:"percentiles"`
	Topic       string               `json:"topic"`
	Channel     string               `json:"channel"`
	Addr        string               `json:"host"`
}

func E2eProcessingLatencyAggregateFromJSON

func E2eProcessingLatencyAggregateFromJSON(j *simplejson.Json, topic, channel, host string) *E2eProcessingLatencyAggregate

func (*E2eProcessingLatencyAggregate) Add

Add merges e2 into e by averaging the percentiles

func (*E2eProcessingLatencyAggregate) Host

func (*E2eProcessingLatencyAggregate) Len

func (*E2eProcessingLatencyAggregate) Less

func (e *E2eProcessingLatencyAggregate) Less(i, j int) bool

func (*E2eProcessingLatencyAggregate) Swap

func (e *E2eProcessingLatencyAggregate) Swap(i, j int)

func (*E2eProcessingLatencyAggregate) Target

func (e *E2eProcessingLatencyAggregate) Target(key string) ([]string, string)

type Quantile

type Quantile struct {
	sync.Mutex

	Percentiles    []float64
	MoveWindowTime time.Duration
	// contains filtered or unexported fields
}

func New

func New(WindowTime time.Duration, Percentiles []float64) *Quantile

func (*Quantile) Insert

func (q *Quantile) Insert(msgStartTime int64)

func (*Quantile) IsDataStale

func (q *Quantile) IsDataStale(now time.Time) bool

func (*Quantile) Merge

func (q *Quantile) Merge(them *Quantile)

func (*Quantile) QueryHandler

func (q *Quantile) QueryHandler() *quantile.Stream

func (*Quantile) Result

func (q *Quantile) Result() *Result

type Result

type Result struct {
	Count       int                  `json:"count"`
	Percentiles []map[string]float64 `json:"percentiles"`
}

func (*Result) String

func (r *Result) String() string

Jump to

Keyboard shortcuts

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