Documentation ¶
Overview ¶
Package boomer provides commands to run load tests and display results.
Index ¶
- type Boomer
- func (b *Boomer) Results() <-chan Result
- func (b *Boomer) Run()
- func (b *Boomer) Stop()
- func (b *Boomer) Wait()
- func (b *Boomer) WithAbortionOnFailure(f bool) *Boomer
- func (b *Boomer) WithAmount(n uint) *Boomer
- func (b *Boomer) WithConcurrency(c uint) *Boomer
- func (b *Boomer) WithDuration(d time.Duration) *Boomer
- func (b *Boomer) WithRateLimit(n uint, rate time.Duration) *Boomer
- func (b *Boomer) WithTimeout(t time.Duration) *Boomer
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Boomer ¶
type Boomer struct { // Request is the request to be made. Request *fasthttp.Request Addr string // Timeout in seconds. Timeout time.Duration ConnectTimeout time.Duration ReadTimeout time.Duration WriteTimeout time.Duration // C is the concurrency level, the number of concurrent workers to run. C uint // N is the total number of requests to make. N uint // F is a flag to abort execution on a request failure F bool // Duration is the amount of time the test should run. Duration time.Duration // contains filtered or unexported fields }
Boomer is the structure responsible for performing requests.
func (*Boomer) Run ¶
func (b *Boomer) Run()
Run makes all the requests, prints the summary. It blocks until all work is done.
func (*Boomer) Wait ¶
func (b *Boomer) Wait()
Wait blocks until Boomer successfully finished or is fully stopped
func (*Boomer) WithAbortionOnFailure ¶
WithAbortionOnFailure determines if pla should stop if any request fails
func (*Boomer) WithAmount ¶
WithAmount specifies the total amount of requests Boomer should execute.
func (*Boomer) WithConcurrency ¶
WithConcurrency determines the amount of concurrency Boomer should use. Defaults to the amount of cores of the running machine.
func (*Boomer) WithDuration ¶
WithDuration specifies the duration of the test that Boomer will perform.
func (*Boomer) WithRateLimit ¶
WithRateLimit configures Boomer to never overpass a certain rate.