aggregator

package
v0.0.0-...-fa799f8 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2014 License: MIT Imports: 2 Imported by: 2

Documentation

Overview

Package aggregator aggregates statistics

Package aggregator aggregates statistics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StatsAggregate

type StatsAggregate struct {
	Average, Min, Max float64
	Count             int
}

StatsAggregate represents the computed aggregation of a collection of stats

func Aggregate

func Aggregate(stats []*stat.Stat) (aggregate StatsAggregate)

Aggregate aggregates a collection of statistics, returning the average, min and max. Aggregate only examines the 'Value' property of a stat, and ignores all other properties (i.e. Name)

func AppendStatsAggregate

func AppendStatsAggregate(a, b StatsAggregate) (aggregate StatsAggregate)

AppendStatsAggregate appends new StatsAggregate values to an existing one, safely computing new values in the process. This function enables aggregates to be combined without re-computing all the original values

Jump to

Keyboard shortcuts

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