PercentageBased

Applies n% of the time, based on result of a Random.

Functions

Link copied to clipboard
fun fromEnvironment(env: (String) -> String? = System::getenv, defaultPercentage: Int = 50, name: String = "CHAOS_PERCENTAGE"): Trigger

Get a percentage from the environment. Defaults to CHAOS_PERCENTAGE and a value of 50%

Link copied to clipboard
operator fun invoke(injectionFrequency: Int, selector: Random = Random): Trigger