Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateStatistics ¶
func CalculateStatistics(samples []*dme.Sample) dme.Statistics
Utility function that returns Statistics struct with Avg, Min, Max, StdDev, and NumSamples
func InitLatencyMetric ¶
func InitLatencyMetric(m *LatencyMetric, times []time.Duration)
Types ¶
type LatencyMetric ¶
type LatencyMetric struct {
// contains filtered or unexported fields
}
func (*LatencyMetric) AddLatency ¶
func (m *LatencyMetric) AddLatency(d time.Duration)
func (*LatencyMetric) AddToMetric ¶
func (m *LatencyMetric) AddToMetric(metric *edgeproto.Metric)
func (*LatencyMetric) FromMetric ¶
func (m *LatencyMetric) FromMetric(metric *edgeproto.Metric)
type RollingStatistics ¶
type RollingStatistics struct {
Statistics dme.Statistics
}
Rolling avg, min, max, std dev, and number of clients
func NewRollingStatistics ¶
func NewRollingStatistics() *RollingStatistics
func (*RollingStatistics) UpdateRollingStatistics ¶
func (r *RollingStatistics) UpdateRollingStatistics(samples ...float64)
Add new samples to RollingStatistics struct and update RollingLatency statistics
Click to show internal directories.
Click to hide internal directories.