grpcstats

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

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

Jump to

Keyboard shortcuts

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