Documentation ¶
Overview ¶
Package aggregate is a helper library for keeping track of multiple metrics at a time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimpleAggregateMetric ¶
type SimpleAggregateMetric struct {
// contains filtered or unexported fields
}
SimpleAggregateMetric is a wrapper metric that tracks multiple univariate single-value metrics simultaneously. Note that it simply stores multiple metrics and pushes to all of them; this can be inefficient for metrics that could make use of shared data.
func NewSimpleAggregateMetric ¶
func NewSimpleAggregateMetric(metrics ...stream.SimpleMetric) *SimpleAggregateMetric
NewSimpleAggregateMetric instantiates an SimpleAggregateMetric struct.
func (*SimpleAggregateMetric) Clear ¶
func (s *SimpleAggregateMetric) Clear()
Clear resets all metrics.
func (*SimpleAggregateMetric) Push ¶
func (s *SimpleAggregateMetric) Push(x float64) error
Push adds a new value for the metrics to consume.
func (*SimpleAggregateMetric) Values ¶
func (s *SimpleAggregateMetric) Values() (map[string]float64, error)
Values returns the values of the metrics; in particular, it returns a map of strings to values, where the strings are the string representations of each metric (i.e. the result of calling String()).
type SimpleJointAggregateMetric ¶
type SimpleJointAggregateMetric struct {
// contains filtered or unexported fields
}
SimpleJointAggregateMetric is a wrapper metric that tracks multiple multivariate single-value metrics simultaneously. Note that it simply stores multiple metrics and pushes to all of them; this can be inefficient for metrics that could make use of shared data.
func NewSimpleJointAggregateMetric ¶
func NewSimpleJointAggregateMetric(metrics ...stream.SimpleJointMetric) *SimpleJointAggregateMetric
NewSimpleJointAggregateMetric instantiates an SimpleJointAggregateMetric struct.
func (*SimpleJointAggregateMetric) Clear ¶
func (s *SimpleJointAggregateMetric) Clear()
Clear resets all metrics.
func (*SimpleJointAggregateMetric) Push ¶
func (s *SimpleJointAggregateMetric) Push(xs ...float64) error
Push adds a new value for the metrics to consume.
func (*SimpleJointAggregateMetric) Values ¶
func (s *SimpleJointAggregateMetric) Values() (map[string]float64, error)
Values returns the values of the metrics; in particular, it returns a map of strings to values, where the strings are the string representations of each metric (i.e. the result of calling String()).