k6
action k6

# stress_endpoint

Stress a single endpoint with a configurable amount of VUs

Run it now
View details

Type | action
Module | chaosk6.actions
Name | stress_endpoint
Return | None

Usage

JSON

    {
      "name": "stress-endpoint",
      "type": "action",
      "provider": {
        "type": "python",
        "module": "chaosk6.actions",
        "func": "stress_endpoint"
      }
    }

YAML

    name: stress-endpoint
    provider:
      func: stress_endpoint
      module: chaosk6.actions
      type: python
    type: action

Arguments

Name | Type | Default | Required
--- | --- | --- | ---
endpoint | string | null | No
vus | integer | 1 | No
duration | string | ”1s” | No

Depending on the specs of the attacking machine, possible VU amount may vary. For a non-customized 2019 Macbook Pro, it will cap around 250 +/- 50.

- endpoint (str): The URL to the endpoint you want to stress, including the scheme prefix.
- vus (int): Amount of virtual users to run the test with
- duration (str): Duration, written as a string, ie: `1h2m3s` etc

Signature

    def stress_endpoint(endpoint: str = None, vus: int = 1, duration: str = '1s'):
        pass

## Related starters

- k6
  probe k6

  ## `http`

  Probe an endpoint to make sure it responds to an http request with the expected HTTP status code
- k6
  action k6

  ## `run_script`

  Runs an arbitrary k6 script
- k6
  probe k6

  ## `http`

  Probe an endpoint to make sure it responds to an http request with the expected HTTP status code