Skip to content

Latest commit

History

History
101 lines (64 loc) 路 2.31 KB

api.rst

File metadata and controls

101 lines (64 loc) 路 2.31 KB

API

Locust class

locust.core.Locust

HttpLocust class

locust.core.HttpLocust

TaskSet class

locust.core.TaskSet

task decorator

locust.core.task

TaskSequence class

locust.core.TaskSequence

seq_task decorator

locust.core.seq_task

Built in wait_time functions

locust.wait_time

HttpSession class

locust.clients.HttpSession

Response class

This class actually resides in the python-requests library, since that's what Locust is using to make HTTP requests, but it's included in the API docs for locust since it's so central when writing locust load tests. You can also look at the :pyResponse <requests.Response> class at the requests documentation.

requests.Response

ResponseContextManager class

locust.clients.ResponseContextManager

InterruptTaskSet Exception

locust.exception.InterruptTaskSet

Event hooks

The event hooks are instances of the locust.events.EventHook class:

locust.events.EventHook

Note

It's highly recommended that you add a wildcard keyword argument in your event listeners to prevent your code from breaking if new arguments are added in a future version.

Available hooks

The following event hooks are available under the locust.events module:

locust.events