client

package
v0.0.0-...-7a521f1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address                  string
	UseUnixAddr              bool
	ClientTimeout            time.Duration
	Connections              uint
	Streams                  uint
	TotalRequests            uint
	TotalTargetRps           uint
	Interval                 time.Duration
	NumIterations            uint
	LatencyPercentiles       string
	LengthPercentiles        string
	RequestLengthPercentiles string
	ErrorRate                float64
	NoIntervalReport         bool
	NoFinalReport            bool
	Streaming                bool
	StreamingRatio           string
	MetricAddr               string
	LatencyUnit              string
	TlsTrustChainFile        string
}

/ Configuration to run a client.

func (Config) Run

func (cfg Config) Run()

TODO: this would be much less ugly if the configuration was either stored in a struct, or used viper...

type MeasuredResponse

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

MeasuredResponse tracks the latency of a response and any accompanying error. timeBetweenFrames is how long we spend waiting for the next frame to arrive.

type Quantiles

type Quantiles struct {
	Quantile50  int64 `json:"p50"`
	Quantile75  int64 `json:"p75"`
	Quantile90  int64 `json:"p90"`
	Quantile95  int64 `json:"p95"`
	Quantile99  int64 `json:"p99"`
	Quantile999 int64 `json:"p999"`
}

Quantiles contains common latency quantiles (p50, p95, p999)

type Report

type Report struct {
	Good    uint       `json:"good"`
	Bad     uint       `json:"bad"`
	Bytes   uint       `json:"bytes"`
	Latency *Quantiles `json:"latency"`
	Jitter  *Quantiles `json:"jitter"`
}

Report provides top-level good/bad numbers and a latency breakdown.

Jump to

Keyboard shortcuts

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