MCPcopy Index your code

hub / github.com/locustio/locust / functions

Functions1,982 in github.com/locustio/locust

↓ 327 callersMethodget
Sends a GET request
locust/contrib/fasthttp.py:317
↓ 187 callersMethodexpect
(self, to_expect, *, stream="stderr")
locust/test/subprocess_utils.py:121
↓ 180 callersFunction_user_count_on_worker
(d: dict[str, dict[str, int]], worker_node_id: str)
locust/test/test_dispatch.py:4169
↓ 114 callersMethodget
Retrieve a StatsEntry instance by name and method
locust/stats.py:262
↓ 113 callersMethodmocked_send
(cls, message)
locust/test/test_runners.py:61
↓ 110 callersMethodnew_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 callersFunctionconstant
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 callersFunctionrenderWithProvider
(Component: React.ReactElement, initialState = {})
locust/webui/src/test/testUtils.tsx:15
↓ 96 callersFunction_aggregate_dispatched_users
(d: dict[str, dict[str, int]])
locust/test/test_dispatch.py:4160
↓ 92 callersMethodadd_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 callersMethodpatch
Sends a PATCH request
locust/contrib/fasthttp.py:349
↓ 87 callersFunctionmock_locustfile
(filename_prefix="mock_locustfile", content=MOCK_LOCUSTFILE_CONTENT, dir=None)
locust/test/mock_locustfile.py:41
↓ 73 callersMethodfire
(self, *, reverse=False, **kwargs)
locust/event.py:40
↓ 62 callersMethodjson
(cls)
locust/user/users.py:239
↓ 59 callersMethodquit
Stop any running load test and kill all greenlets for the runner
locust/runners.py:414
↓ 59 callersMethodstart
(self, group: Group)
locust/test/test_runners.py:3533
↓ 51 callersFunctionmocked_rpc
(raise_on_close=True)
locust/test/test_runners.py:51
↓ 46 callersMethodlog
(self, response_time: int, content_length: int)
locust/stats.py:370
↓ 45 callersMethodspawn
(user_class: str, spawn_count: int)
locust/runners.py:222
↓ 40 callersMethoderror
(self, message)
locust/argument_parser.py:57
↓ 40 callersMethodget_messages
(cls, message_type=None)
locust/test/test_runners.py:79
↓ 40 callersMethodpost
Sends a POST request
locust/contrib/fasthttp.py:353
↓ 39 callersFunctionget_parser
(default_config_files=DEFAULT_CONFIG_FILES)
locust/argument_parser.py:902
↓ 35 callersMethodadd_listener
(self, handler)
locust/event.py:33
↓ 33 callersMethodget_runner
(self, user_classes=None)
locust/test/test_runners.py:2283
↓ 33 callersMethodnot_expect_any
(self, to_not_expect, *, stream="stderr")
locust/test/subprocess_utils.py:158
↓ 30 callersFunctiontemporary_file
(content, suffix="_locustfile.py", dir=None)
locust/test/util.py:24
↓ 29 callersMethodfailure
(self, *_args, **_kwargs)
locust/contrib/fasthttp.py:638
↓ 29 callersMethodget_client
(self, base_url=None)
locust/test/test_http.py:17
↓ 29 callersMethodstop
(self)
locust/test/test_locust_class.py:412
↓ 28 callersMethodrun
(self)
locust/user/users.py:155
↓ 25 callersMethodcreate_local_runner
Create a :class:`LocalRunner <locust.runners.LocalRunner>` instance for this Environment
locust/env.py:132
↓ 24 callersMethodlog_request
(this)
locust/test/testcases.py:231
↓ 23 callersMethodcreate_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 callersMethodget_client
(self)
locust/test/test_fasthttp.py:21
↓ 21 callersMethodlog
(response_time, size)
locust/test/test_stats.py:116
↓ 21 callersMethodrequest
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 callersMethodcreate_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 callersMethodinterrupt
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 callersMethodstart
( self, user_count: int, spawn_rate: float, wait: bool = False, user_classes: list[type[User]] | None
locust/runners.py:547
↓ 20 callersFunctiontoTitleCase
(string: string)
locust/webui/src/utils/string.ts:46
↓ 19 callersFunctionbetween
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 callersMethodterminate
(self)
locust/test/subprocess_utils.py:175
↓ 18 callersMethodclose
(self, linger=None)
locust/rpc/zmqrpc.py:62
↓ 18 callersMethodget_run_time
Calculates run time in seconds of the load test
locust/shape.py:45
↓ 17 callersMethodget_runner
(self, client, environment=None, user_classes=None, auto_connect=True)
locust/test/test_runners.py:3436
↓ 16 callersMethodextend
Extend the data from the current StatsEntry with the stats from another StatsEntry instance.
locust/stats.py:498
↓ 16 callersMethodlog_request
(self, method: str, name: str, response_time: int, content_length: int)
locust/stats.py:246
↓ 16 callersMethodregister
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 callersMethodwait
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 callersMethodremove_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 callersMethodrest
(self, method, url, **kwargs)
examples/rest.py:80
↓ 15 callersMethodsuccess
(self)
locust/contrib/fasthttp.py:633
↓ 14 callersFunctionconnect
(sid, environ)
examples/socketio/echo_server.py:22
↓ 14 callersFunctioncreateOptions
({ charts, title, lines, colors, chartValueFormatter, splitAxis, yAxisLabels, xAxis, grid,
locust/webui/src/components/LineChart/LineChart.utils.ts:73
↓ 13 callersMethodadd_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 callersMethodlog_error
(exc)
locust/test/test_stats.py:119
↓ 13 callersMethodserialize
(self)
locust/rpc/protocol.py:41
↓ 13 callersMethodwriterow
(self, columns: Iterable[str | int | float])
locust/stats.py:46
↓ 12 callersMethodclose
Flush and close the underlying file handle. Safe to call multiple times.
locust/contrib/csv_request_logger.py:122
↓ 12 callersMethodcreate_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 callersFunctionfilter_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 callersFunctionproper_round
(val, digits=0)
locust/util/rounding.py:1
↓ 12 callersMethodreset_time
Resets start time back to 0
locust/shape.py:39
↓ 12 callersMethodstart_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 callersFunctionuseAction
(action: T, dispatch?: any)
locust/webui/src/redux/hooks.ts:14
↓ 11 callersMethodclose
(self)
locust/test/subprocess_utils.py:95
↓ 11 callersFunctionget_locustfiles_from_args
(*args, **kwargs)
locust/test/util.py:97
↓ 11 callersFunctionlocust_exception_handler
(environment: Environment)
locust/runners.py:66
↓ 11 callersMethodregister_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 callersFunctionrun_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 callersMethodsend
(self, msg)
locust/rpc/zmqrpc.py:25
↓ 11 callersMethodserialize_stats
(self)
locust/stats.py:287
↓ 10 callersFunctionget_free_tcp_port
Find an unused TCP port
locust/test/util.py:48
↓ 10 callersMethodlog_exception
(self, node_id: str, msg: str, formatted_tb: str)
locust/runners.py:421
↓ 10 callersFunctionpatch_env
(name: str, value: str)
locust/test/util.py:36
↓ 10 callersMethodrequest
Constructs and sends a :py:class:`requests.Request`. Returns :py:class:`requests.Response` object. :param method: method for
locust/clients.py:143
↓ 10 callersMethodupdate_state
Updates the current state
locust/runners.py:197
↓ 10 callersMethodwait_time
(self)
locust/test/test_locust_class.py:337
↓ 9 callersFunction_fire
Fire a synthetic request event with sensible defaults.
locust/test/test_csv_request_logger.py:17
↓ 9 callersFunction_print_t
Print something with a tab instead of newline at the end
locust/debug.py:18
↓ 9 callersFunction_user_count
(d: dict[str, dict[str, int]])
locust/test/test_dispatch.py:4165
↓ 9 callersMethodclear_all
Remove all stats entries and errors
locust/stats.py:278
↓ 9 callersMethodget_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 callersMethodget_current_user_count
Returns current actual number of users from the runner
locust/shape.py:51
↓ 9 callersMethodget_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 callersMethodinsert
(self, data)
locust/contrib/milvus.py:28
↓ 9 callersFunctionis_user_class
Check if a variable is a runnable (non-abstract) User class
locust/util/load_locustfile.py:14
↓ 9 callersMethodraise_for_status
Raise any connection errors that occurred during the request
locust/contrib/fasthttp.py:578
↓ 9 callersMethodserialize_errors
(self)
locust/stats.py:292
↓ 9 callersMethodspawn_users
(self, user_classes_spawn_count: dict[str, int], wait: bool = False)
locust/runners.py:214
↓ 9 callersFunctionwait_for_server
(url, timeout=5, interval=0.5)
locust/test/util.py:102
↓ 8 callersMethod_read_csv
(self)
locust/test/test_csv_request_logger.py:61
↓ 8 callersFunctioncamelCaseKeys
( object: ObjectInterface, )
locust/webui/src/utils/string.ts:39
↓ 8 callersFunctioncreate_environment
Create an Environment instance from options
locust/main.py:56
↓ 8 callersMethodfilter
(self, record)
locust/web.py:623
↓ 8 callersFunctionget_ratio
(user_classes: list[type[User]], user_spawned: dict[str, int], total: bool)
locust/user/inspectuser.py:53
↓ 8 callersMethodget_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 callersMethodquery
(self, filter, output_fields=None)
locust/contrib/milvus.py:54
↓ 8 callersMethodremove_file_if_exists
(self, filename)
locust/test/test_stats.py:503
next →1–100 of 1,982, ranked by callers