Helper functions for creating toxics for use with toxiproxy.
These can be passed as the first argument to $add on a
toxic proxy in lieu of the type and attributes
arguments.
latency(latency, jitter = 0) bandwidth(rate) slow_close(delay) timeout(timeout) slicer(average_size, size_variation, delay = 0) limit_data(bytes)
| latency | Latency in milliseconds |
|---|---|
| jitter | Time in milliseconds |
| rate | Rate in KB per second |
| delay | Time in milliseconds |
| timeout | Time in milliseconds |
| average_size | Size in bytes of an average packet |
| size_variation | Variation in bytes of an average packet
(should be smaller than |
| bytes | The number of bytes it should transmit before connection is closed |