recorder

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BySeq added in v1.1.0

type BySeq []*Stat

BySeq implements sort.Interface for []*Stat based on the Seq field.

func (BySeq) Len added in v1.1.0

func (a BySeq) Len() int

func (BySeq) Less added in v1.1.0

func (a BySeq) Less(i, j int) bool

func (BySeq) Swap added in v1.1.0

func (a BySeq) Swap(i, j int)

type Record

type Record struct {
	// contains filtered or unexported fields
}

Record is a record of packets.

func NewRecord

func NewRecord() *Record

NewRecord creates a new record with the given number of probes.

func (*Record) AddPacket added in v1.1.0

func (r *Record) AddPacket(p *probing.Packet)

func (*Record) Stats

func (r *Record) Stats() []*Stat

type Stat added in v1.1.0

type Stat struct {
	// Latency for the transfer.
	Latency time.Duration
	// Total time for the transfer.
	Rtt time.Duration
	// Bandwidth for the transfer.
	Bandwidth float64
	// The sequence number of the transfer.
	Seq int
}

Stats contains the statistics of a transfer.

func Average added in v1.1.0

func Average(stats []*Stat) *Stat

func IQRFilter added in v1.1.0

func IQRFilter(s []*Stat) ([]*Stat, error)

func MADFilter added in v1.1.0

func MADFilter(s []*Stat) ([]*Stat, error)

func ProcessStats added in v1.1.0

func ProcessStats(stats []*Stat) (*Stat, error)

func Sanitize added in v1.1.0

func Sanitize(stats []*Stat) []*Stat

func (*Stat) String added in v1.1.0

func (s *Stat) String() string

Jump to

Keyboard shortcuts

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