measurement

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Measurement

type Measurement struct {
	Sent     uint64
	Received uint64
	RTTSum   uint64
	RTTMin   uint64
	RTTMax   uint64
	RTTs     []uint64
}

Measurement represents a measurement

type MeasurementsDB

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

MeasurementsDB manages measurements

func NewDB

func NewDB() *MeasurementsDB

NewDB creates a new measurements database

func (*MeasurementsDB) AddRecv

func (m *MeasurementsDB) AddRecv(sentTsNS int64, rtt uint64, measurementDurationMS uint64)

AddRecv adds a received probe to the db

func (*MeasurementsDB) AddSent

func (m *MeasurementsDB) AddSent(ts int64)

AddSent adds a sent probe to the db

func (*MeasurementsDB) Get

func (m *MeasurementsDB) Get(ts int64) *Measurement

Get get's the measurement at ts

func (*MeasurementsDB) RemoveOlder

func (m *MeasurementsDB) RemoveOlder(ts int64)

RemoveOlder removes all probes from the db that are older than ts

Jump to

Keyboard shortcuts

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