actionWiremock

random_delay

Adds a random delay to a list of mapppings

Activity as code

Below are the details and signature of the activity Python module.

Typeaction
Modulechaoswm.actions
Namerandom_delay
Returnlist

Usage

JSON

{
  "name": "random-delay",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaoswm.actions",
    "func": "random_delay",
    "arguments": {
      "filter": [],
      "delayDistribution": null
    }
  }
}

YAML

name: random-delay
provider:
  arguments:
    delayDistribution: null
    filter: []
  func: random_delay
  module: chaoswm.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
filterlistYesFilterFilter to add random delay to
delayDistributionobjectYesDelay DistributionHow to distribute the delays across the filter results

Signature

def random_delay(filter: List[Any],
                 delayDistribution: Mapping[str, Any],
                 configuration: Dict[str, Dict[str, str]] = None) -> List[Any]:
    pass