test

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vegeta

type Vegeta struct {

	//报表属性
	ReportPlot, ReportText, ReportHDRHistogramPlot             bool
	ReportPlotFile, ReportTextFile, ReportHDRHistogramPlotFile *os.File
	ReportPlotLabel                                            plot.Labeler
	ResultFunc                                                 func(*vegeta.Result)
	// contains filtered or unexported fields
}

vegeta 配置对象

func NewVegeta

func NewVegeta(qps, cycle int, title string) *Vegeta

func (*Vegeta) AddMeta

func (v *Vegeta) AddMeta(key string, data interface{})

func (*Vegeta) AddTarget

func (v *Vegeta) AddTarget(name string, target vegeta.Targeter)

func (*Vegeta) Attack

func (v *Vegeta) Attack() vegeta.Metrics

func (*Vegeta) AutoAttack

func (v *Vegeta) AutoAttack(autoParams func(qps, cycle int) (nqps, ncycle int), condition func(metrics vegeta.Metrics) bool) (ms []vegeta.Metrics)

自动压测,至少压测一次,直到不满足条件退出

func (*Vegeta) GetMeta

func (v *Vegeta) GetMeta(key string) interface{}

func (*Vegeta) Workers

func (v *Vegeta) Workers(workers int)

Jump to

Keyboard shortcuts

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