Documentation
¶
Index ¶
- type Metrics
- func (m *Metrics) AddBits(bits uint64)
- func (m *Metrics) AddError(count uint64)
- func (m *Metrics) AddPacket(count uint64)
- func (m *Metrics) AddSample(sample uint64)
- func (m *Metrics) GetAvgDepth() uint64
- func (m *Metrics) GetBitRate() uint64
- func (m *Metrics) GetErrorRate() uint64
- func (m *Metrics) GetPacketRate() uint64
- func (m *Metrics) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func NewMetrics ¶
NewMetrics creates a new Metrics instance and starts a goroutine to update bitRate, packetRate, errorRate, and avgDepth every interval.
func (*Metrics) GetAvgDepth ¶
GetAvgDepth returns the current average depth
func (*Metrics) GetBitRate ¶
GetBitRate returns the current bits per second rate
func (*Metrics) GetErrorRate ¶
GetErrorRate returns the current errors per second rate
func (*Metrics) GetPacketRate ¶
GetPacketRate returns the current packets per second rate
Click to show internal directories.
Click to hide internal directories.