MCPcopy
hub / github.com/tsenart/vegeta / Pacer

Interface Pacer

lib/pacer.go:10–20  ·  view source on GitHub ↗

A Pacer defines the rate of hits during an Attack.

Source from the content-addressed store, hash-verified

8
9// A Pacer defines the rate of hits during an Attack.
10type Pacer interface {
11 // Pace returns the duration an Attacker should wait until
12 // hitting the next Target, given an already elapsed duration and
13 // completed hits. If the second return value is true, an attacker
14 // should stop sending hits.
15 Pace(elapsed time.Duration, hits uint64) (wait time.Duration, stop bool)
16
17 // Rate returns a Pacer's instantaneous hit rate (per seconds)
18 // at the given elapsed duration of an attack.
19 Rate(elapsed time.Duration) float64
20}
21
22// A PacerFunc is a function adapter type that implements
23// the Pacer interface.

Callers 2

TestSinePacerPace_FlatFunction · 0.65
AttackMethod · 0.65

Implementers 3

ConstantPacerlib/pacer.go
SinePacerlib/pacer.go
LinearPacerlib/pacer.go

Calls

no outgoing calls

Tested by

no test coverage detected