responsetimecollector

package
v0.0.0-...-e825a9d Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewArrayCollector

func NewArrayCollector() *arrayCollector

func NewTachymeterCollector

func NewTachymeterCollector(window int) *tachymeterCollector

Types

type Aggregation

type Aggregation struct {
	P50 time.Duration // P50 is the 50th percentile response time.
	P75 time.Duration // P75 is the 75th percentile response time.
	P95 time.Duration // P95 is the 95th percentile response time.
}

type Collector

type Collector interface {
	All() []float64          // All gets all the response times collected.
	Len() int                // Len gets the number of response times collected.
	Add(t time.Duration)     // Add sends a new response time to the collector.
	Aggregate() *Aggregation // Aggregate calculates aggregate metrics over a defined time period.
	Reset()                  // Reset resets the state of the collector for reuse.
}

Jump to

Keyboard shortcuts

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