client

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidURL

func IsValidURL(urlStr string) bool

IsValidURL checks if string is valid URL

func SplitHeader

func SplitHeader(header string) (int, []string)

SplitHeader splits string on colon and return a slice

Types

type Cassowary

type Cassowary struct {
	FileMode              bool
	IsTLS                 bool
	BaseURL               string
	ConcurrencyLevel      int
	Requests              int
	Duration              int
	ExportMetrics         bool
	ExportMetricsFile     string
	PromExport            bool
	Cloudwatch            bool
	Histogram             bool
	Boxplot               bool
	TLSConfig             *tls.Config
	PromURL               string
	RequestHeader         []string
	URLPaths              []string
	DisableTerminalOutput bool
	DisableKeepAlive      bool
	Client                *http.Client
	Bar                   *progressbar.ProgressBar
	Timeout               int
	HTTPMethod            string
	Data                  []byte
}

Cassowary is the main struct with bootstraps the load test

func (*Cassowary) Coordinate

func (c *Cassowary) Coordinate() (ResultMetrics, error)

Coordinate bootstraps the load test based on values in Cassowary struct

func (*Cassowary) PlotBoxplot added in v0.14.0

func (c *Cassowary) PlotBoxplot(durations []float64) error

PlotBoxplot outputs a boxplot png

func (*Cassowary) PlotHistogram added in v0.13.0

func (c *Cassowary) PlotHistogram(durations []float64) error

PlotHistogram outputs a histogram png

func (*Cassowary) PushPrometheusMetrics

func (c *Cassowary) PushPrometheusMetrics(metrics ResultMetrics) error

PushPrometheusMetrics exports metrics to a PushGateway

func (*Cassowary) PutCloudwatchMetrics added in v0.9.0

func (c *Cassowary) PutCloudwatchMetrics(svc cloudwatchiface.CloudWatchAPI, metrics ResultMetrics) (*cloudwatch.PutMetricDataOutput, error)

PutCloudwatchMetrics exports metrics to AWS Cloudwatch

type ResultMetrics

type ResultMetrics struct {
	BaseURL           string                `json:"base_url"`
	TotalRequests     int                   `json:"total_requests"`
	FailedRequests    int                   `json:"failed_requests"`
	RequestsPerSecond float64               `json:"requests_per_second"`
	DNSMedian         float64               `json:"dns_median"`
	TCPStats          tcpStats              `json:"tcp_connect"`
	ProcessingStats   serverProcessingStats `json:"server_processing"`
	ContentStats      contentTransfer       `json:"content_transfer"`
}

ResultMetrics are the aggregated metrics after the load test

Jump to

Keyboard shortcuts

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