report

package
v0.0.0-...-ff54ef9 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Details

type Details struct {
	ExpectedNumberOfRequests int
	ActualNumberOfRequests   int

	MinDNSLookup     float64
	MaxDNSLookup     float64
	AverageDNSLookup float64

	MinConnection     float64
	MaxConnection     float64
	AverageConnection float64

	MinResponse     float64
	MaxResponse     float64
	AverageResponse float64

	MinRequest     float64
	MaxRequest     float64
	AverageRequest float64

	MinDelay     float64
	MaxDelay     float64
	AverageDelay float64

	MinTotalLatency     float64
	MaxTotalLatency     float64
	AverageTotalLatency float64
}

type Metric

type Metric struct {
	Min     float64
	Max     float64
	Average float64
}

func NewMetric

func NewMetric() Metric

func (*Metric) Update

func (s *Metric) Update(value float64, count int)

type Report

type Report struct {
	Test int
	// contains filtered or unexported fields
}

func New

func New(expectedRequests int, results chan RequestResult) *Report

func (*Report) Details

func (r *Report) Details() Details

Details returns the details of the report.

func (*Report) Finished

func (r *Report) Finished() <-chan bool

Finished returns a channel that will be closed when the reporter is finished.

func (*Report) Run

func (r *Report) Run()

Run will block until the results channel is closed.

type RequestResult

type RequestResult struct {
	DNSDuration        time.Duration
	ConnectionDuration time.Duration
	ResponseDuration   time.Duration
	RequestDuration    time.Duration
	DelayDuration      time.Duration
	TotalDuration      time.Duration
	ResponseCode       int
}

Jump to

Keyboard shortcuts

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