LinearPacer paces an attack by starting at a given request rate and increasing linearly with the given slope.
| 251 | // LinearPacer paces an attack by starting at a given request rate |
| 252 | // and increasing linearly with the given slope. |
| 253 | type LinearPacer struct { |
| 254 | StartAt Rate |
| 255 | Slope float64 |
| 256 | } |
| 257 | |
| 258 | // Pace determines the length of time to sleep until the next hit is sent. |
| 259 | func (p LinearPacer) Pace(elapsed time.Duration, hits uint64) (time.Duration, bool) { |
nothing calls this directly
no outgoing calls
no test coverage detected