Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/locustio/locust
/ functions
Functions
1,982 in github.com/locustio/locust
⨍
Functions
1,982
◇
Types & classes
577
↳
Endpoints
63
↓ 327 callers
Method
get
Sends a GET request
locust/contrib/fasthttp.py:317
↓ 187 callers
Method
expect
(self, to_expect, *, stream="stderr")
locust/test/subprocess_utils.py:121
↓ 180 callers
Function
_user_count_on_worker
(d: dict[str, dict[str, int]], worker_node_id: str)
locust/test/test_dispatch.py:4169
↓ 114 callers
Method
get
Retrieve a StatsEntry instance by name and method
locust/stats.py:262
↓ 113 callers
Method
mocked_send
(cls, message)
locust/test/test_runners.py:61
↓ 110 callers
Method
new_dispatch
Initialize a new dispatch cycle. :param target_user_count: The desired user count at the end of the dispatch cycle :param sp
locust/dispatch.py:185
↓ 107 callers
Function
constant
Returns a function that just returns the number specified by the wait_time argument Example:: class MyUser(User): wait_
locust/user/wait_time.py:23
↓ 98 callers
Function
renderWithProvider
(Component: React.ReactElement, initialState = {})
locust/webui/src/test/testUtils.tsx:15
↓ 96 callers
Function
_aggregate_dispatched_users
(d: dict[str, dict[str, int]])
locust/test/test_dispatch.py:4160
↓ 92 callers
Method
add_argument
This method supports the same args as ArgumentParser.add_argument(..) as well as the additional args below. Arguments:
locust/argument_parser.py:66
↓ 88 callers
Method
patch
Sends a PATCH request
locust/contrib/fasthttp.py:349
↓ 87 callers
Function
mock_locustfile
(filename_prefix="mock_locustfile", content=MOCK_LOCUSTFILE_CONTENT, dir=None)
locust/test/mock_locustfile.py:41
↓ 73 callers
Method
fire
(self, *, reverse=False, **kwargs)
locust/event.py:40
↓ 62 callers
Method
json
(cls)
locust/user/users.py:239
↓ 59 callers
Method
quit
Stop any running load test and kill all greenlets for the runner
locust/runners.py:414
↓ 59 callers
Method
start
(self, group: Group)
locust/test/test_runners.py:3533
↓ 51 callers
Function
mocked_rpc
(raise_on_close=True)
locust/test/test_runners.py:51
↓ 46 callers
Method
log
(self, response_time: int, content_length: int)
locust/stats.py:370
↓ 45 callers
Method
spawn
(user_class: str, spawn_count: int)
locust/runners.py:222
↓ 40 callers
Method
error
(self, message)
locust/argument_parser.py:57
↓ 40 callers
Method
get_messages
(cls, message_type=None)
locust/test/test_runners.py:79
↓ 40 callers
Method
post
Sends a POST request
locust/contrib/fasthttp.py:353
↓ 39 callers
Function
get_parser
(default_config_files=DEFAULT_CONFIG_FILES)
locust/argument_parser.py:902
↓ 35 callers
Method
add_listener
(self, handler)
locust/event.py:33
↓ 33 callers
Method
get_runner
(self, user_classes=None)
locust/test/test_runners.py:2283
↓ 33 callers
Method
not_expect_any
(self, to_not_expect, *, stream="stderr")
locust/test/subprocess_utils.py:158
↓ 30 callers
Function
temporary_file
(content, suffix="_locustfile.py", dir=None)
locust/test/util.py:24
↓ 29 callers
Method
failure
(self, *_args, **_kwargs)
locust/contrib/fasthttp.py:638
↓ 29 callers
Method
get_client
(self, base_url=None)
locust/test/test_http.py:17
↓ 29 callers
Method
stop
(self)
locust/test/test_locust_class.py:412
↓ 28 callers
Method
run
(self)
locust/user/users.py:155
↓ 25 callers
Method
create_local_runner
Create a :class:`LocalRunner <locust.runners.LocalRunner>` instance for this Environment
locust/env.py:132
↓ 24 callers
Method
log_request
(this)
locust/test/testcases.py:231
↓ 23 callers
Method
create_master_runner
Create a :class:`MasterRunner <locust.runners.MasterRunner>` instance for this Environment :param master_bind_host: Interface/host t
locust/env.py:138
↓ 22 callers
Method
get_client
(self)
locust/test/test_fasthttp.py:21
↓ 21 callers
Method
log
(response_time, size)
locust/test/test_stats.py:116
↓ 21 callers
Method
request
Send an HTTP request :param method: method for the new :class:`Request` object. :param url: path that will be concatenated w
locust/contrib/fasthttp.py:190
↓ 20 callers
Method
create_worker_runner
Create a :class:`WorkerRunner <locust.runners.WorkerRunner>` instance for this Environment :param master_host: Host/IP of a running
locust/env.py:152
↓ 20 callers
Method
interrupt
Interrupt the TaskSet and hand over execution control back to the parent TaskSet. If *reschedule* is True (default), the parent User
locust/user/task.py:473
↓ 20 callers
Method
start
( self, user_count: int, spawn_rate: float, wait: bool = False, user_classes: list[type[User]] | None
locust/runners.py:547
↓ 20 callers
Function
toTitleCase
(string: string)
locust/webui/src/utils/string.ts:46
↓ 19 callers
Function
between
Returns a function that will return a random number between min_wait and max_wait. Example:: class MyUser(User): # wait
locust/user/wait_time.py:10
↓ 19 callers
Method
terminate
(self)
locust/test/subprocess_utils.py:175
↓ 18 callers
Method
close
(self, linger=None)
locust/rpc/zmqrpc.py:62
↓ 18 callers
Method
get_run_time
Calculates run time in seconds of the load test
locust/shape.py:45
↓ 17 callers
Method
get_runner
(self, client, environment=None, user_classes=None, auto_connect=True)
locust/test/test_runners.py:3436
↓ 16 callers
Method
extend
Extend the data from the current StatsEntry with the stats from another StatsEntry instance.
locust/stats.py:498
↓ 16 callers
Method
log_request
(self, method: str, name: str, response_time: int, content_length: int)
locust/stats.py:246
↓ 16 callers
Method
register
Attach this logger to *environment*'s event hooks. Must be called once, typically inside an ``@events.init`` listener.
locust/contrib/csv_request_logger.py:112
↓ 16 callers
Method
wait
Make the running user sleep for a duration defined by the User.wait_time function. The user can also be killed gracefully wh
locust/user/users.py:172
↓ 15 callers
Method
remove_worker
This method is similar to the above `add_worker`. When a worker disconnects (because of e.g. network failure, worker failure, etc.),
locust/dispatch.py:230
↓ 15 callers
Method
rest
(self, method, url, **kwargs)
examples/rest.py:80
↓ 15 callers
Method
success
(self)
locust/contrib/fasthttp.py:633
↓ 14 callers
Function
connect
(sid, environ)
examples/socketio/echo_server.py:22
↓ 14 callers
Function
createOptions
({ charts, title, lines, colors, chartValueFormatter, splitAxis, yAxisLabels, xAxis, grid,
locust/webui/src/components/LineChart/LineChart.utils.ts:73
↓ 13 callers
Method
add_worker
This method is to be called when a new worker connects to the master. When a new worker is added, the users dispatcher will flag that
locust/dispatch.py:217
↓ 13 callers
Method
log_error
(exc)
locust/test/test_stats.py:119
↓ 13 callers
Method
serialize
(self)
locust/rpc/protocol.py:41
↓ 13 callers
Method
writerow
(self, columns: Iterable[str | int | float])
locust/stats.py:46
↓ 12 callers
Method
close
Flush and close the underlying file handle. Safe to call multiple times.
locust/contrib/csv_request_logger.py:122
↓ 12 callers
Method
create_web_ui
Creates a :class:`WebUI <locust.web.WebUI>` instance for this Environment and start running the web server :param host: Host/interfa
locust/env.py:168
↓ 12 callers
Function
filter_tasks_by_tags
Function used by Environment to recursively remove any tasks/TaskSets from a TaskSet/User that shouldn't be executed according to the tag opt
locust/user/task.py:186
↓ 12 callers
Function
proper_round
(val, digits=0)
locust/util/rounding.py:1
↓ 12 callers
Method
reset_time
Resets start time back to 0
locust/shape.py:39
↓ 12 callers
Method
start_shape
Start running a load test with a custom LoadTestShape specified in the :meth:`Environment.shape_class <locust.env.Environment.shape_class>` p
locust/runners.py:324
↓ 12 callers
Function
useAction
(action: T, dispatch?: any)
locust/webui/src/redux/hooks.ts:14
↓ 11 callers
Method
close
(self)
locust/test/subprocess_utils.py:95
↓ 11 callers
Function
get_locustfiles_from_args
(*args, **kwargs)
locust/test/util.py:97
↓ 11 callers
Function
locust_exception_handler
(environment: Environment)
locust/runners.py:66
↓ 11 callers
Method
register_message
Register a listener for a custom message from another node :param msg_type: The type of the message to listen for :param lis
locust/runners.py:428
↓ 11 callers
Function
run_single_user
Runs a single User. Useful when you want to run a debugger. It creates in a new locust :py:attr:`Environment <locust.env.Environment>` and t
locust/debug.py:106
↓ 11 callers
Method
send
(self, msg)
locust/rpc/zmqrpc.py:25
↓ 11 callers
Method
serialize_stats
(self)
locust/stats.py:287
↓ 10 callers
Function
get_free_tcp_port
Find an unused TCP port
locust/test/util.py:48
↓ 10 callers
Method
log_exception
(self, node_id: str, msg: str, formatted_tb: str)
locust/runners.py:421
↓ 10 callers
Function
patch_env
(name: str, value: str)
locust/test/util.py:36
↓ 10 callers
Method
request
Constructs and sends a :py:class:`requests.Request`. Returns :py:class:`requests.Response` object. :param method: method for
locust/clients.py:143
↓ 10 callers
Method
update_state
Updates the current state
locust/runners.py:197
↓ 10 callers
Method
wait_time
(self)
locust/test/test_locust_class.py:337
↓ 9 callers
Function
_fire
Fire a synthetic request event with sensible defaults.
locust/test/test_csv_request_logger.py:17
↓ 9 callers
Function
_print_t
Print something with a tab instead of newline at the end
locust/debug.py:18
↓ 9 callers
Function
_user_count
(d: dict[str, dict[str, int]])
locust/test/test_dispatch.py:4165
↓ 9 callers
Method
clear_all
Remove all stats entries and errors
locust/stats.py:278
↓ 9 callers
Method
get_current_response_time_percentile
Calculate the *current* response time for a certain percentile. We use a sliding window of (approximately) the last 10 seconds (speci
locust/stats.py:609
↓ 9 callers
Method
get_current_user_count
Returns current actual number of users from the runner
locust/shape.py:51
↓ 9 callers
Method
get_worker_index
Get the worker index for the specified client ID; this is a deterministic 0-based ordinal number and guaranteed to not change
locust/runners.py:714
↓ 9 callers
Method
insert
(self, data)
locust/contrib/milvus.py:28
↓ 9 callers
Function
is_user_class
Check if a variable is a runnable (non-abstract) User class
locust/util/load_locustfile.py:14
↓ 9 callers
Method
raise_for_status
Raise any connection errors that occurred during the request
locust/contrib/fasthttp.py:578
↓ 9 callers
Method
serialize_errors
(self)
locust/stats.py:292
↓ 9 callers
Method
spawn_users
(self, user_classes_spawn_count: dict[str, int], wait: bool = False)
locust/runners.py:214
↓ 9 callers
Function
wait_for_server
(url, timeout=5, interval=0.5)
locust/test/util.py:102
↓ 8 callers
Method
_read_csv
(self)
locust/test/test_csv_request_logger.py:61
↓ 8 callers
Function
camelCaseKeys
( object: ObjectInterface, )
locust/webui/src/utils/string.ts:39
↓ 8 callers
Function
create_environment
Create an Environment instance from options
locust/main.py:56
↓ 8 callers
Method
filter
(self, record)
locust/web.py:623
↓ 8 callers
Function
get_ratio
(user_classes: list[type[User]], user_spawned: dict[str, int], total: bool)
locust/user/inspectuser.py:53
↓ 8 callers
Method
get_response_time_percentile
Get the response time that a certain number of percent of the requests finished within. Percent specified in range: 0.0 - 1.
locust/stats.py:600
↓ 8 callers
Method
query
(self, filter, output_fields=None)
locust/contrib/milvus.py:54
↓ 8 callers
Method
remove_file_if_exists
(self, filename)
locust/test/test_stats.py:503
next →
1–100 of 1,982, ranked by callers