perf

package
v0.0.0-...-f2127f7 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Perf

type Perf struct {
	Values uint32
	Bytes  uint64

	// Measurements interval
	StartTime time.Time
	EndTime   time.Time
	// contains filtered or unexported fields
}

Perf stores performance data for an experiment.

func (*Perf) Add

func (p *Perf) Add(r *Record)

Add a Record to the performance data.

func (*Perf) LatencyMean

func (p *Perf) LatencyMean() time.Duration

LatencyMean returns the mean latency.

func (*Perf) LatencyStdev

func (p *Perf) LatencyStdev() time.Duration

LatencyStdev returns the standard deviation of latencies.

func (*Perf) Mbps

func (p *Perf) Mbps() float64

Mbps returns throughput in megabits per second.

func (*Perf) Reset

func (p *Perf) Reset()

Reset the performance data.

func (*Perf) ValuesPerSec

func (p *Perf) ValuesPerSec() float64

ValuesPerSec returns throughput in decided values per second.

type Record

type Record struct {
	Size      int
	Timestamp time.Time
	Latency   time.Duration
}

Record stores information of a decided value.

Jump to

Keyboard shortcuts

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