Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
Tracker collects bytes sent by the Agent and produces a throughput measurement.
func NewTracker ¶
NewTracker returns a new Tracker, which can then be used to track bytes sent and produce a throughput measurement.
func (*Tracker) RecordBytesSent ¶
RecordBytesSent tracks bytes sent. For accurate throughput measurement this function should be called every time bytes are sent on the wire. More frequent and granular calls to this function will provide a more accurate throughput measurement.
Takes no action for a nil receiver.
func (*Tracker) Throughput ¶
Throughput returns the current measured throughput in bytes/second.
Returns zero for a nil receiver.
Click to show internal directories.
Click to hide internal directories.