v12.5.0
fluffle
tagged this
12 May 11:58
* Introduce Pacer interface and ConstantPacer. The Pacer interface allows vegeta's attack rate to be customized. Attack code keeps track of the elapsed attack duration and the number of hits sent and provides these to Pace, which must return a Duration for the attack code to sleep for before sending the next hit. Pace may also return true for the second stop value to terminate the attack. This interface allows vegeta to model a wider range of attack scenarios, such as diurnal request patterns or load-test behaviour, where the attack rate increases until the target begins to serve errors. * Add SinePacer, for sinusoidal attack rates. SinePacer is a Pacer that describes attack request rates with the equation Rate = Mean * Amplitude * sin(Offset + t * (2𝛑 / Period)). Both the Mean and Amplitude rates are expressed with ConstantPacer.