http4k / org.http4k.chaos / ChaosBehaviours / Latency
object Latency
Blocks the thread for a random amount of time within the allocated range.
Name | Summary |
---|---|
fromEnv | Get a latency range from the environment. Defaults to CHAOS_LATENCY_MS_MIN/MAX and a value of 100ms -> 500msfun fromEnv(env: ( String ) -> String ? = System::getenv, defaultMin: Duration = ofMillis(100), defaultMax: Duration = ofMillis(500), minName: String = "CHAOS_LATENCY_MS_MIN", maxName: String = "CHAOS_LATENCY_MS_MAX"): Behaviour |
invoke | operator fun invoke(min: Duration = ofMillis(100), max: Duration = ofMillis(500)): Behaviour |