locust 2.20.1.dev28__tar.gz → 2.20.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {locust-2.20.1.dev28 → locust-2.20.2}/.git-blame-ignore-revs +6 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/.github/workflows/tests.yml +2 -3
- {locust-2.20.1.dev28 → locust-2.20.2}/.gitignore +1 -0
- locust-2.20.2/.vscode/extensions.json +6 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/.vscode/settings.json +2 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/CHANGELOG.md +18 -0
- {locust-2.20.1.dev28/locust.egg-info → locust-2.20.2}/PKG-INFO +2 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/benchmarks/dispatch.py +6 -6
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/changelog.rst +7 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/conf.py +3 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/configuration.rst +43 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/developing-locust.rst +17 -27
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/extending-locust.rst +23 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/requirements.txt +1 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/running-distributed.rst +29 -21
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/what-is-locust.rst +1 -3
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/add_command_line_argument.py +1 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/basic.py +1 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/browse_docs_sequence_test.py +3 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/browse_docs_test.py +3 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/custom_messages.py +1 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/custom_shape/double_wave.py +2 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/custom_shape/stages.py +1 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/custom_shape/staging_user_classes.py +1 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/custom_shape/step_load.py +2 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/custom_shape/wait_user_count.py +4 -5
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/custom_wait_function.py +1 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/custom_xmlrpc_client/xmlrpc_locustfile.py +3 -3
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/debugging.py +1 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/debugging_advanced.py +1 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/dynamic_user_credentials.py +1 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/events.py +1 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/extend_modern_web_ui.py +6 -4
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/extend_web_ui/extend.py +5 -3
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/grpc/grpc_user.py +4 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/grpc/hello_pb2.py +2 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/grpc/hello_pb2_grpc.py +0 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/grpc/hello_server.py +5 -4
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/grpc/locustfile.py +2 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/locustfile.py +2 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/manual_stats_reporting.py +4 -4
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/multiple_hosts.py +3 -3
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/nested_inline_tasksets.py +1 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/rest.py +3 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/sdk_session_patching/session_patch_locustfile.py +1 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/semaphore_wait.py +1 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/stop_on_threshold.py +4 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/terraform/aws/plan/basic.py +2 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/test_data_management.py +5 -4
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/use_as_lib.py +5 -3
- locust-2.20.2/examples/web_ui_auth.py +80 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/worker_index.py +2 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/__init__.py +7 -7
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/_version.py +2 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/argument_parser.py +35 -18
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/clients.py +7 -6
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/contrib/fasthttp.py +42 -37
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/debug.py +14 -8
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/dispatch.py +25 -25
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/env.py +45 -37
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/event.py +13 -10
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/exception.py +0 -9
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/html.py +9 -8
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/input_events.py +7 -5
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/main.py +95 -47
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/rpc/protocol.py +4 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/rpc/zmqrpc.py +6 -4
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/runners.py +69 -76
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/shape.py +7 -4
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/stats.py +73 -71
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/templates/index.html +8 -23
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/mock_logging.py +7 -5
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_dispatch.py +10 -9
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_env.py +30 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_fasthttp.py +9 -8
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_http.py +4 -3
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_load_locustfile.py +6 -5
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_locust_class.py +11 -5
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_log.py +5 -4
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_main.py +37 -7
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_parser.py +11 -15
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_runners.py +22 -21
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_sequential_taskset.py +3 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_stats.py +16 -18
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_tags.py +3 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_taskratio.py +3 -3
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_users.py +3 -3
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_util.py +3 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_wait_time.py +3 -3
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_web.py +142 -27
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_zmqrpc.py +5 -3
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/util.py +6 -7
- locust-2.20.2/locust/user/__init__.py +2 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/user/inspectuser.py +6 -5
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/user/sequential_taskset.py +3 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/user/task.py +22 -27
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/user/users.py +17 -7
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/util/deprecation.py +0 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/util/load_locustfile.py +4 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/web.py +102 -53
- locust-2.20.2/locust/webui/auth.html +19 -0
- locust-2.20.2/locust/webui/dist/assets/auth-5e21717c.js.map +1 -0
- locust-2.20.1.dev28/locust/webui/dist/assets/index-01afe4fa.js → locust-2.20.2/locust/webui/dist/assets/index-a83a5dd9.js +85 -84
- locust-2.20.2/locust/webui/dist/assets/index-a83a5dd9.js.map +1 -0
- locust-2.20.2/locust/webui/dist/auth.html +20 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/dist/index.html +1 -1
- locust-2.20.2/locust/webui/src/auth.tsx +103 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Form/Form.tsx +7 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Form/Select.tsx +1 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Form/tests/Form.test.tsx +12 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Modal/Modal.tsx +1 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/StatsTable/StatsTable.tsx +28 -8
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/SwarmCharts/SwarmCharts.tsx +6 -4
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/SwarmForm/SwarmEditForm.tsx +5 -5
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/SwarmForm/SwarmForm.tsx +32 -13
- locust-2.20.2/locust/webui/src/components/SwarmForm/SwarmUserClassPicker.tsx +186 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/SwarmForm/tests/SwarmForm.test.tsx +49 -4
- locust-2.20.2/locust/webui/src/components/SwarmForm/tests/SwarmUserClassPicker.test.tsx +173 -0
- locust-2.20.2/locust/webui/src/components/ViewColumnSelector/ViewColumnSelector.test.tsx +57 -0
- locust-2.20.2/locust/webui/src/components/ViewColumnSelector/ViewColumnSelector.tsx +61 -0
- locust-2.20.2/locust/webui/src/constants/swarm.tsx +17 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/global.d.ts +2 -0
- locust-2.20.2/locust/webui/src/hooks/tests/useSelecteViewColumns.test.tsx +59 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/hooks/tests/useSwarmUi.test.tsx +7 -7
- locust-2.20.2/locust/webui/src/hooks/useSelectViewColumns.ts +28 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/index.tsx +15 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/redux/api/swarm.ts +8 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/redux/slice/swarm.slice.ts +5 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/redux/slice/ui.slice.ts +2 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/test/mocks/statsRequest.mock.ts +8 -8
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/test/mocks/swarmState.mock.ts +5 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/test/setup.ts +5 -1
- locust-2.20.2/locust/webui/src/types/auth.types.ts +11 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/types/swarm.types.ts +8 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/types/ui.types.ts +1 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/vite.config.ts +14 -0
- {locust-2.20.1.dev28 → locust-2.20.2/locust.egg-info}/PKG-INFO +2 -2
- {locust-2.20.1.dev28 → locust-2.20.2}/locust.egg-info/SOURCES.txt +15 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/locust.egg-info/requires.txt +1 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/pyproject.toml +23 -6
- {locust-2.20.1.dev28 → locust-2.20.2}/scripts/locustfile.py +2 -3
- {locust-2.20.1.dev28 → locust-2.20.2}/tox.ini +9 -18
- locust-2.20.1.dev28/locust/user/__init__.py +0 -2
- locust-2.20.1.dev28/locust/webui/src/constants/swarm.tsx +0 -13
- {locust-2.20.1.dev28 → locust-2.20.2}/.coveragerc +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/.dockerignore +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/.gitattributes +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/.github/CONTRIBUTING.md +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/.github/ISSUE_TEMPLATE/bug.yml +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/.github/workflows/stale.yml +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/.readthedocs.yaml +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/.vscode/launch.json +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/.vscode/launch_locust.json +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/Dockerfile +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/LICENSE +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/MANIFEST.in +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/Makefile +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/README +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/README.md +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/SECURITY.md +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/Vagrantfile +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/_static/theme-overrides.css +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/api.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/custom-load-shape.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/further-reading.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/history.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/images/modern-webui-splash-screenshot.png +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/images/number_of_users.png +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/images/response_times.png +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/images/total_requests_per_second.png +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/images/userclass_picker_example.png +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/images/webui-running-statistics.png +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/images/webui-splash-screenshot.png +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/increase-performance.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/index.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/installation.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/logging.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/quickstart.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/retrieving-stats.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/running-cloud-integration.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/running-in-debugger.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/running-in-docker.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/running-without-web-ui.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/tasksets.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/testing-other-systems.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/use-as-lib.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/docs/writing-a-locustfile.rst +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/custom_xmlrpc_client/server.py +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/docker-compose/docker-compose.yml +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/extend_web_ui/static/custom-stats-table.css +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/extend_web_ui/static/extend.js +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/extend_web_ui/templates/extend.html +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/fast_http_locust.py +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/grpc/hello.proto +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/terraform/aws/README.md +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/terraform/aws/data_subnet.tf +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/terraform/aws/main.tf +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/terraform/aws/output.tf +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/terraform/aws/provisioner.tf +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/terraform/aws/variables.tf +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/vagrant/README.md +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/examples/vagrant/supervisord.conf +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/generate_changelog.py +1 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/__main__.py +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/contrib/__init__.py +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/log.py +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/py.typed +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/rpc/__init__.py +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/chart.js +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/css/application.css +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/css/application.css.map +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/css/tables.css +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/css/tables.css.map +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/echarts.common.min.js +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/img/favicon.ico +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/img/logo.png +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/img/ui-screenshot-charts.png +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/img/ui-screenshot-start-test.png +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/img/ui-screenshot-stats.png +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/img/ui-screenshot-workers.png +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/jquery-1.11.3.min.js +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/jquery.jqote2.min.js +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/jquery.tools.min.js +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/locust.js +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/sass/_base.sass +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/sass/_mixins.sass +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/sass/application.sass +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/sass/tables.sass +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/tasks.js +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/static/vintage.js +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/templates/report.html +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/templates/stats_data.html +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/__init__.py +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/fake_module1_for_env_test.py +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/fake_module2_for_env_test.py +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/mock_locustfile.py +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_debugging.py +4 -4
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_interruptable_task.py +4 -4
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/test_old_wait_api.py +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/test/testcases.py +7 -7
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/user/wait_time.py +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/util/__init__.py +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/util/cache.py +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/util/exception_handler.py +1 -1
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/util/rounding.py +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/util/timespan.py +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/.eslintrc +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/.gitignore +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/.prettierrc +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/dev.html +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/dist/assets/favicon.ico +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/dist/assets/logo.png +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/dist/report.html +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/index.html +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/package.json +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/public/assets/favicon.ico +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/public/assets/logo.png +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/public/report.html +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/App.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/Report.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/DataTable/DataTable.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/DataTable/DataTable.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/ExceptionsTable/ExceptionsTable.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/FailuresTable/FailuresTable.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Form/tests/Select.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Layout/Footer/About.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Layout/Footer/Footer.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Layout/Layout.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Layout/Navbar/DarkLightToggle.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Layout/Navbar/Navbar.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Layout/Navbar/SwarmMonitor.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Layout/Navbar/SwarmMonitor.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/LineChart/LineChart.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/LineChart/LineChart.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/LogViewer/LogViewer.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/LogViewer/tests/LogViewer.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/LogViewer/tests/useLogViewer.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/LogViewer/useLogViewer.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Reports/Reports.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Reports/Reports.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/ResponseTimeTable/ResponseTimeTable.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/ResponseTimeTable/ResponseTimeTable.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/StateButtons/EditButton.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/StateButtons/NewTestButton.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/StateButtons/ResetButton.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/StateButtons/StateButtons.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/StateButtons/StopButton.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/StateButtons/tests/ResetButton.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/StateButtons/tests/StateButtons.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/StateButtons/tests/StopButton.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/SwarmForm/SwarmCustomParameters.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/SwarmForm/tests/SwarmCustomParameters.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/SwarmForm/tests/SwarmEditForm.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/SwarmRatios/SwarmRatios.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/SwarmRatios/SwarmRatios.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Table/Table.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Table/Table.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Tabs/Tabs.constants.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Tabs/Tabs.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/Tabs/Tabs.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/components/WorkersTable/WorkersTable.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/constants/theme.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/hooks/tests/useNotifications.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/hooks/tests/useSortByField.test.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/hooks/useInterval.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/hooks/useNotifications.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/hooks/useSortByField.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/hooks/useSwarmUi.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/redux/hooks.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/redux/slice/logViewer.slice.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/redux/slice/notification.slice.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/redux/slice/root.slice.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/redux/slice/tests/ui.slice.test.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/redux/slice/theme.slice.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/redux/slice/url.slice.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/redux/store.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/redux/utils.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/styles/theme.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/test/constants.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/test/testUtils.tsx +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/types/tab.types.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/types/table.types.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/utils/number.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/utils/object.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/utils/string.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/utils/tests/number.test.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/utils/tests/object.test.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/utils/tests/string.test.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/utils/tests/url.test.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/src/utils/url.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/tsconfig.json +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/vitest.config.ts +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust/webui/yarn.lock +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust.egg-info/dependency_links.txt +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust.egg-info/entry_points.txt +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust.egg-info/not-zip-safe +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/locust.egg-info/top_level.txt +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/package.json +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/scripts/run-disributed-headless.sh +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/scripts/run-disributed-web.sh +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/scripts/run-local-headless.sh +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/scripts/run-local-web.sh +0 -0
- {locust-2.20.1.dev28 → locust-2.20.2}/setup.cfg +0 -0
@@ -5,3 +5,9 @@
|
|
5
5
|
6ec972f4dbb880bf0c7a11809e6c1ba194c9784c
|
6
6
|
# upgrade code style to use f-strings using flynt
|
7
7
|
313b80f27f525441c449593a3aeaf38389f63c13
|
8
|
+
# upgrade typing annotations using fix-future-annotations
|
9
|
+
b5324820b299b1fe7da0608f0cc8ec47f58b1e40
|
10
|
+
# upgrade code style to 3.8 using pyupgrade
|
11
|
+
60f3bceacc4ab9567433d40ae3ed280750f55ff1
|
12
|
+
# sort imports using ruff
|
13
|
+
f99e9df700a8020e4c1967eb42dcb37ddd26e296
|
@@ -16,8 +16,7 @@ jobs:
|
|
16
16
|
include:
|
17
17
|
#- {name: Windows, python: '3.9', os: windows-latest, tox: py39}
|
18
18
|
#- {name: Mac, python: '3.9', os: macos-latest, tox: py39}
|
19
|
-
- { name: "
|
20
|
-
- { name: "black", python: "3.11", os: ubuntu-latest, tox: "black" }
|
19
|
+
- { name: "ruff", python: "3.11", os: ubuntu-latest, tox: "ruff" }
|
21
20
|
- { name: "mypy", python: "3.10", os: ubuntu-latest, tox: "mypy" }
|
22
21
|
# run some integration tests and abort immediately if they fail, for faster feedback
|
23
22
|
- { name: "fail_fast_test_main", python: "3.12", os: ubuntu-latest, tox: fail_fast_test_main }
|
@@ -48,7 +47,7 @@ jobs:
|
|
48
47
|
- run: python -m pip install tox
|
49
48
|
- run: python -m tox -e ${{ matrix.tox }}
|
50
49
|
|
51
|
-
|
50
|
+
lint_typecheck_test_webui:
|
52
51
|
runs-on: ubuntu-latest
|
53
52
|
steps:
|
54
53
|
- uses: actions/checkout@v3
|
@@ -1,6 +1,24 @@
|
|
1
1
|
# Detailed changelog
|
2
2
|
The most important changes can also be found in [the documentation](https://docs.locust.io/en/latest/changelog.html).
|
3
3
|
|
4
|
+
## [2.20.1](https://github.com/locustio/locust/tree/2.20.1) (2024-01-03)
|
5
|
+
|
6
|
+
[Full Changelog](https://github.com/locustio/locust/compare/2.20.0...2.20.1)
|
7
|
+
|
8
|
+
**Fixed bugs:**
|
9
|
+
|
10
|
+
- Vite-version needs to be updated [\#2528](https://github.com/locustio/locust/issues/2528)
|
11
|
+
- Issue of 100% CPU usage when closing WebSocket connections. [\#2516](https://github.com/locustio/locust/issues/2516)
|
12
|
+
|
13
|
+
**Merged pull requests:**
|
14
|
+
|
15
|
+
- Update Vite to 4.5.1 [\#2530](https://github.com/locustio/locust/pull/2530) ([cyberw](https://github.com/cyberw))
|
16
|
+
- Bump vite from 4.4.9 to 4.4.12 in /locust/webui [\#2527](https://github.com/locustio/locust/pull/2527) ([dependabot[bot]](https://github.com/apps/dependabot))
|
17
|
+
- update docker actions to get rid of node12 deprecation warnings [\#2524](https://github.com/locustio/locust/pull/2524) ([mgor](https://github.com/mgor))
|
18
|
+
- Support IPv6 for zmq connection between master and worker [\#2521](https://github.com/locustio/locust/pull/2521) ([simonwu-sn](https://github.com/simonwu-sn))
|
19
|
+
- run\_single\_user improvements [\#2519](https://github.com/locustio/locust/pull/2519) ([cyberw](https://github.com/cyberw))
|
20
|
+
- Bump Requests to 2.26.0, remove explicit dependency on charset\_normalizer [\#2518](https://github.com/locustio/locust/pull/2518) ([cyberw](https://github.com/cyberw))
|
21
|
+
|
4
22
|
## [2.20.0](https://github.com/locustio/locust/tree/2.20.0) (2023-12-13)
|
5
23
|
|
6
24
|
[Full Changelog](https://github.com/locustio/locust/compare/2.19.1...2.20.0)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: locust
|
3
|
-
Version: 2.20.
|
3
|
+
Version: 2.20.2
|
4
4
|
Summary: Developer friendly load testing framework
|
5
5
|
License: MIT
|
6
6
|
Project-URL: Homepage, https://locust.io/
|
@@ -36,7 +36,7 @@ Requires-Dist: pyzmq>=25.0.0
|
|
36
36
|
Requires-Dist: geventhttpclient>=2.0.11
|
37
37
|
Requires-Dist: ConfigArgParse>=1.5.5
|
38
38
|
Requires-Dist: psutil>=5.9.1
|
39
|
-
Requires-Dist: Flask-
|
39
|
+
Requires-Dist: Flask-Login>=0.6.3
|
40
40
|
Requires-Dist: Flask-Cors>=3.0.10
|
41
41
|
Requires-Dist: roundrobin>=0.0.2
|
42
42
|
Requires-Dist: pywin32; platform_system == "Windows"
|
@@ -5,16 +5,16 @@ for calculating the distribution of users on each workers. This benchmark is to
|
|
5
5
|
by people working on Locust's development.
|
6
6
|
"""
|
7
7
|
|
8
|
+
from locust import User
|
9
|
+
from locust.dispatch import UsersDispatcher
|
10
|
+
from locust.runners import WorkerNode
|
11
|
+
|
8
12
|
import itertools
|
9
13
|
import statistics
|
10
14
|
import time
|
11
15
|
|
12
16
|
from prettytable import PrettyTable
|
13
17
|
|
14
|
-
from locust import User
|
15
|
-
from locust.dispatch import UsersDispatcher
|
16
|
-
from locust.runners import WorkerNode
|
17
|
-
|
18
18
|
|
19
19
|
class User1(User):
|
20
20
|
weight = 5
|
@@ -632,8 +632,8 @@ if __name__ == "__main__":
|
|
632
632
|
print()
|
633
633
|
print(table)
|
634
634
|
|
635
|
-
with open(f"results-dispatch-benchmarks-{int(now)}.txt", "
|
635
|
+
with open(f"results-dispatch-benchmarks-{int(now)}.txt", "w") as file:
|
636
636
|
file.write(table.get_string())
|
637
637
|
|
638
|
-
with open(f"results-dispatch-benchmarks-{int(now)}.json", "
|
638
|
+
with open(f"results-dispatch-benchmarks-{int(now)}.json", "w") as file:
|
639
639
|
file.write(table.get_json_string())
|
@@ -4,6 +4,13 @@ Changelog Highlights
|
|
4
4
|
|
5
5
|
For full details of the Locust changelog, please see https://github.com/locustio/locust/blob/master/CHANGELOG.md
|
6
6
|
|
7
|
+
2.20.1
|
8
|
+
======
|
9
|
+
* run_single_user improvements https://github.com/locustio/locust/pull/2519
|
10
|
+
* Support IPv6 for zmq connection between master and worker https://github.com/locustio/locust/pull/2521
|
11
|
+
* Modern UI: Update Vite to 4.5.1 https://github.com/locustio/locust/pull/2530
|
12
|
+
* Other tiny fixes
|
13
|
+
|
7
14
|
2.20.0
|
8
15
|
======
|
9
16
|
* Add event.measure context manager for simpler firing of request event (experimental) https://github.com/locustio/locust/pull/2511
|
@@ -7,11 +7,12 @@
|
|
7
7
|
# All configuration values have a default value; values that are commented out
|
8
8
|
# serve to show the default value.
|
9
9
|
|
10
|
+
from locust.argument_parser import get_empty_argument_parser, setup_parser_arguments
|
11
|
+
|
10
12
|
import os
|
11
13
|
import subprocess
|
12
|
-
import sphinx_rtd_theme
|
13
14
|
|
14
|
-
|
15
|
+
import sphinx_rtd_theme
|
15
16
|
|
16
17
|
|
17
18
|
# Run command `locust --help` and store output in cli-help-output.txt which is included in the docs
|
@@ -164,6 +164,44 @@ The Web UI will display:
|
|
164
164
|
|
165
165
|
|
|
166
166
|
|
167
|
+
With the new ``--modern-ui``, the class picker will addtionally allow for configuring any settings for each selected user.
|
168
|
+
This includes selecting tasks, configuring the weight or fixed count, and configuring the host.
|
169
|
+
|
170
|
+
It is even possible to add custom arguments that you wish to be configurable for each user. Simply add a ``json`` classethod
|
171
|
+
to your user:
|
172
|
+
|
173
|
+
.. code-block:: python
|
174
|
+
class Example(HttpUser):
|
175
|
+
@task
|
176
|
+
def example_task(self):
|
177
|
+
self.client.get(f"/example/{self.some_custom_arg}")
|
178
|
+
|
179
|
+
@classmethod
|
180
|
+
def json(self):
|
181
|
+
return {
|
182
|
+
"host": self.host,
|
183
|
+
"some_custom_arg": "example"
|
184
|
+
}
|
185
|
+
|
186
|
+
Configuration for the User classes
|
187
|
+
==================================
|
188
|
+
|
189
|
+
You can configure any settings you may wish for each user on the command line, the same as you may in the modern UI.
|
190
|
+
Using the ``--config-users`` argument, you may pass a JSON string or file with your user configuration. To configure
|
191
|
+
multiple users you pass multiple arguments to ``--config-users`` or use a JSON Array.
|
192
|
+
|
193
|
+
Each user settings object must contain a key ``user_class_name``. This key corresponds to the class that you wish
|
194
|
+
to configure.
|
195
|
+
|
196
|
+
Example:
|
197
|
+
|
198
|
+
.. code-block:: console
|
199
|
+
|
200
|
+
$ locust --config-users '{"user_class_name": "Example", "fixed_count": 1}'
|
201
|
+
$ locust --config-users '[{"user_class_name": "Example", "fixed_count": 1}, {"user_class_name": "ExampleTwo", "fixed_count": 2}]'
|
202
|
+
$ locust --config-users '{"user_class_name": "Example", "fixed_count": 1}' '{"user_class_name": "ExampleTwo", "fixed_count": 2}'
|
203
|
+
$ locust --config-users config_users.json
|
204
|
+
|
167
205
|
Custom arguments
|
168
206
|
================
|
169
207
|
|
@@ -199,8 +237,11 @@ The list of statistics parameters that can be modified is:
|
|
199
237
|
| CURRENT_RESPONSE_TIME_PERCENTILE_WINDOW | Window size/resolution - in seconds - when calculating the current response |
|
200
238
|
| | time percentile |
|
201
239
|
+-------------------------------------------+--------------------------------------------------------------------------------------+
|
202
|
-
| PERCENTILES_TO_REPORT |
|
240
|
+
| PERCENTILES_TO_REPORT | List of response time percentiles to be calculated & reported |
|
241
|
+
+-------------------------------------------+--------------------------------------------------------------------------------------+
|
242
|
+
| PERCENTILES_TO_CHART | List of response time percentiles in the screen of chart for Web UI |
|
203
243
|
+-------------------------------------------+--------------------------------------------------------------------------------------+
|
204
|
-
|
|
244
|
+
| PERCENTILES_TO_STATISTICS | List of response time percentiles in the screen of statistics for Web UI |
|
245
|
+
| | This parameter supports only modern UI |
|
205
246
|
+-------------------------------------------+--------------------------------------------------------------------------------------+
|
206
247
|
|
@@ -31,11 +31,11 @@ We use `tox <https://tox.readthedocs.io/en/stable/>`_ to automate tests across m
|
|
31
31
|
|
32
32
|
$ pip3 install tox
|
33
33
|
$ tox
|
34
|
-
py37 create: /home/myuser/git/locust/.tox/py37
|
35
|
-
py37 installdeps: mock, retry, pyquery, cryptography
|
36
34
|
...
|
37
|
-
|
38
|
-
|
35
|
+
py38: install_deps> python -I -m pip install cryptography mock pyquery retry
|
36
|
+
py38: commands[0]> python3 -m pip install .
|
37
|
+
...
|
38
|
+
py38: commands[1]> python3 -m unittest discover
|
39
39
|
...
|
40
40
|
|
41
41
|
To only run a specific suite or specific test you can call `pytest <https://docs.pytest.org/>`_ directly:
|
@@ -44,38 +44,28 @@ To only run a specific suite or specific test you can call `pytest <https://docs
|
|
44
44
|
|
45
45
|
$ pytest locust/test/test_main.py::DistributedIntegrationTests::test_distributed_tags
|
46
46
|
|
47
|
-
|
48
|
-
|
47
|
+
Formatting and linting
|
48
|
+
======================
|
49
49
|
|
50
|
-
Locust
|
50
|
+
Locust uses `ruff <https://github.com/astral-sh/ruff/>`_ for formatting and linting. The build will fail if code does not adhere to it. If you run vscode it will automatically run every time you save a file, but if your editor doesn't support it you can run it manually:
|
51
51
|
|
52
52
|
.. code-block:: console
|
53
53
|
|
54
|
-
$ pip3 install
|
55
|
-
$ python -m
|
54
|
+
$ pip3 install ruff
|
55
|
+
$ python -m ruff --fix <file_or_folder_to_be_formatted>
|
56
|
+
$ python -m ruff format <file_or_folder_to_be_formatted>
|
56
57
|
|
57
58
|
You can validate the whole project using tox:
|
58
59
|
|
59
60
|
.. code-block:: console
|
60
61
|
|
61
|
-
$ tox -e
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
Linting
|
69
|
-
=======
|
70
|
-
|
71
|
-
Our code is checked using `flake8 <https://flake8.pycqa.org/en/latest/flake8>`_:
|
72
|
-
|
73
|
-
.. code-block:: console
|
74
|
-
|
75
|
-
$ tox -e flake8
|
76
|
-
flake8 installed: flake8==5.0.4,mccabe==0.7.0,pycodestyle==2.9.1,pyflakes==2.5.0
|
77
|
-
flake8 run-test-pre: PYTHONHASHSEED='1517754253'
|
78
|
-
flake8 run-test: commands[0] | flake8 . --count --show-source --statistics
|
62
|
+
$ tox -e ruff
|
63
|
+
ruff: install_deps> python -I -m pip install ruff==0.1.13
|
64
|
+
ruff: commands[0]> ruff check .
|
65
|
+
ruff: commands[1]> ruff format --check
|
66
|
+
104 files already formatted
|
67
|
+
ruff: OK (1.41=setup[1.39]+cmd[0.01,0.01] seconds)
|
68
|
+
congratulations :) (1.47 seconds)
|
79
69
|
|
80
70
|
Build documentation
|
81
71
|
===================
|
@@ -128,6 +128,29 @@ source code.
|
|
128
128
|
|
129
129
|
|
130
130
|
|
131
|
+
Adding Authentication to the Web UI
|
132
|
+
===================================
|
133
|
+
|
134
|
+
Locust uses `Flask-Login <https://pypi.org/project/Flask-Login/>`_ to handle authentication. The ``login_manager`` is
|
135
|
+
exposed on ``environment.web_ui.app``, allowing the flexibility for you to implement any kind of auth that you would like!
|
136
|
+
|
137
|
+
To use username / password authentication, simply provide a ``username_password_callback`` to the ``environment.web_ui.auth_args``.
|
138
|
+
You are responsible for defining the route for the callback and implementing the authentication.
|
139
|
+
|
140
|
+
Authentication providers can additionally be configured to allow authentication from 3rd parties such as GitHub or an SSO.
|
141
|
+
Simply provide a list of desired ``auth_providers``. You may specify the ``label`` and ``icon`` for display on the button.
|
142
|
+
The ``callback_url`` will be the url that the button directs to. You will be responsible for defining the callback route as
|
143
|
+
well as the authentication with the 3rd party.
|
144
|
+
|
145
|
+
Whether you are using username / password authentication, an auth provider, or both, a ``user_loader`` needs to be proivded
|
146
|
+
to the ``login_manager``. The ``user_loader`` should return ``None`` to deny authentication or return a User object when
|
147
|
+
authentication to the app should be granted.
|
148
|
+
|
149
|
+
A full example can be seen `in the auth example <https://github.com/locustio/locust/tree/master/examples/web_ui_auth.py>`_.
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
131
154
|
Run a background greenlet
|
132
155
|
=========================
|
133
156
|
|
@@ -4,29 +4,24 @@
|
|
4
4
|
Distributed load generation
|
5
5
|
===========================
|
6
6
|
|
7
|
-
A single process running Locust can simulate a reasonably high throughput. For a simple test plan
|
7
|
+
A single process running Locust can simulate a reasonably high throughput. For a simple test plan and small payloads it can make more than a thousand requests per second, possibly over ten thousand if you use :ref:`FastHttpUser <increase-performance>`.
|
8
8
|
|
9
|
-
But if your test plan is complex or you want to run even more load, you'll need to scale out to multiple processes, maybe even multiple machines.
|
9
|
+
But if your test plan is complex or you want to run even more load, you'll need to scale out to multiple processes, maybe even multiple machines. Fortunately, Locust supports distributed runs out of the box.
|
10
10
|
|
11
|
-
To do this, you start one instance of Locust
|
11
|
+
To do this, you start one instance of Locust with the ``--master`` flag and one or more using the ``--worker`` flag. The master instance runs Locust's web interface, and tells the workers when to spawn/stop Users. The worker instances run your Users and send statistics back to the master. The master instance doesn't run any Users itself.
|
12
12
|
|
13
|
-
To
|
13
|
+
To simplify startup, you can use the ``--processes`` flag. It will launch a master process and the specified number of worker processes. It can also be used in combination with ``--worker``, then it will only launch workers. This feature relies on `fork() <https://linux.die.net/man/3/fork>`_ so it doesn't work on Windows.
|
14
14
|
|
15
15
|
.. note::
|
16
|
-
|
17
|
-
|
18
|
-
The master instance runs Locust's web interface, and tells the workers when to spawn/stop Users. The worker instances run your Users and send statistics back to the master. The master instance doesn't run any Users itself.
|
19
|
-
|
20
|
-
Both the master and worker machines must have a copy of the locustfile when running Locust distributed.
|
16
|
+
Because Python cannot fully utilize more than one core per process (see `GIL <https://realpython.com/python-gil/>`_), you need to run one worker instance per processor core in order to have access to all your computing power.
|
21
17
|
|
22
18
|
.. note::
|
23
|
-
There is almost no limit to how many
|
19
|
+
There is almost no limit to how many Users you can run per worker. Locust/gevent can run thousands or even tens of thousands of Users per process just fine, as long as their total request rate (RPS) is not too high.
|
24
20
|
|
25
|
-
|
26
|
-
If Locust is getting close to running out of CPU resources, it will log a warning. If there is no warning, you can be pretty sure your test is not limited by load generator CPU.
|
21
|
+
If Locust *is* getting close to running out of CPU resources, it will log a warning. If there is no warning but you are still unable to generate the expected load, then the problem must be `something else <https://github.com/locustio/locust/wiki/FAQ#increase-my-request-raterps>`_.
|
27
22
|
|
28
|
-
|
29
|
-
|
23
|
+
Single machine
|
24
|
+
==============
|
30
25
|
|
31
26
|
It is really simple to launch a master and 4 worker processes::
|
32
27
|
|
@@ -36,21 +31,34 @@ You can even auto-detect the number of cores in your machine and launch one work
|
|
36
31
|
|
37
32
|
locust --processes -1
|
38
33
|
|
39
|
-
|
40
|
-
|
34
|
+
Multiple machines
|
35
|
+
=================
|
41
36
|
|
42
37
|
Start locust in master mode on one machine::
|
43
38
|
|
44
39
|
locust -f my_locustfile.py --master
|
45
40
|
|
46
|
-
And then on each worker machine
|
41
|
+
And then on each worker machine (make sure they also have a copy of the locustfile):
|
42
|
+
|
43
|
+
.. code-block:: bash
|
47
44
|
|
48
45
|
locust -f my_locustfile.py --worker --master-host <your master's address> --processes 4
|
49
46
|
|
50
|
-
|
47
|
+
Multiple machines, using locust-swarm
|
48
|
+
=====================================
|
49
|
+
|
50
|
+
Both worker and master need access to the locustfile, and when you make changes to it you'll need to restart all Locust processes. `locust-swarm <https://github.com/SvenskaSpel/locust-swarm>`_ automates this for you. It also solves the issue of firewall/network access from workers to master using SSH tunnels (this is often a problem if the master is running on your workstation and workers are running in some datacenter).
|
51
|
+
|
52
|
+
.. code-block:: bash
|
53
|
+
|
54
|
+
pip install locust-swarm
|
55
|
+
|
56
|
+
swarm -f my_locustfile.py --loadgen-list worker-server1,worker-server2 <any other regular locust parameters>
|
57
|
+
|
58
|
+
See `locust-swarm <https://github.com/SvenskaSpel/locust-swarm>`_ for more details.
|
51
59
|
|
52
|
-
Options
|
53
|
-
|
60
|
+
Options for distributed load generation
|
61
|
+
=======================================
|
54
62
|
|
55
63
|
``--master-host <hostname or ip>``
|
56
64
|
----------------------------------
|
@@ -85,7 +93,7 @@ Communicating across nodes
|
|
85
93
|
=============================================
|
86
94
|
|
87
95
|
When running Locust in distributed mode, you may want to communicate between master and worker nodes in
|
88
|
-
order to coordinate
|
96
|
+
order to coordinate the test. This can be easily accomplished with custom messages using the built in messaging hooks:
|
89
97
|
|
90
98
|
.. code-block:: python
|
91
99
|
|
@@ -52,9 +52,7 @@ load against a dynamic website where most pages had different content for differ
|
|
52
52
|
verbose configuration files to declare the tests. In Locust we took a different approach. Instead of configuration formats or UIs
|
53
53
|
you'd get a python framework that would let you define the behaviour of your users using Python code.
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
Previous versions of Locust used terminology borrowed from nature (swarming, hatching, attacking etc), but now employs more industry standard naming.
|
55
|
+
Locust takes its name from the `grasshopper species <https://en.wikipedia.org/wiki/Locust>`_, known for their swarming behaviour.
|
58
56
|
|
59
57
|
:ref:`history`
|
60
58
|
|
@@ -1,8 +1,10 @@
|
|
1
1
|
# This locust test script example will simulate a user
|
2
2
|
# browsing the Locust documentation on https://docs.locust.io/
|
3
3
|
|
4
|
+
from locust import HttpUser, SequentialTaskSet, between, task
|
5
|
+
|
4
6
|
import random
|
5
|
-
|
7
|
+
|
6
8
|
from pyquery import PyQuery
|
7
9
|
|
8
10
|
|
@@ -1,8 +1,10 @@
|
|
1
1
|
# This locust test script example will simulate a user
|
2
2
|
# browsing the Locust documentation on https://docs.locust.io/
|
3
3
|
|
4
|
+
from locust import HttpUser, TaskSet, between, task
|
5
|
+
|
4
6
|
import random
|
5
|
-
|
7
|
+
|
6
8
|
from pyquery import PyQuery
|
7
9
|
|
8
10
|
|
@@ -1,10 +1,9 @@
|
|
1
|
-
from
|
1
|
+
from locust import HttpUser, LoadTestShape, TaskSet, constant, task
|
2
|
+
|
2
3
|
import math
|
3
|
-
import time
|
4
4
|
import random
|
5
|
-
|
6
|
-
from
|
7
|
-
from locust import LoadTestShape
|
5
|
+
import time
|
6
|
+
from collections import namedtuple
|
8
7
|
|
9
8
|
|
10
9
|
class UserTasks(TaskSet):
|
@@ -3,8 +3,7 @@ This is an example of a locustfile that uses Locust's built in event hooks to
|
|
3
3
|
track the sum of the content-length header in all successful HTTP responses
|
4
4
|
"""
|
5
5
|
|
6
|
-
from locust import HttpUser, TaskSet, task, web
|
7
|
-
from locust import events
|
6
|
+
from locust import HttpUser, TaskSet, between, events, task, web
|
8
7
|
|
9
8
|
|
10
9
|
class MyTaskSet(TaskSet):
|
@@ -4,12 +4,14 @@ UI extension hooks to track the sum of the content-length header in all
|
|
4
4
|
successful HTTP responses and display them in the web UI.
|
5
5
|
"""
|
6
6
|
|
7
|
-
import
|
7
|
+
from locust import HttpUser, TaskSet, between, events, task, web
|
8
|
+
|
8
9
|
import json
|
9
|
-
|
10
|
+
import os
|
10
11
|
from html import escape
|
11
|
-
from
|
12
|
-
|
12
|
+
from time import time
|
13
|
+
|
14
|
+
from flask import Blueprint, jsonify, make_response, render_template, request
|
13
15
|
|
14
16
|
|
15
17
|
class MyTaskSet(TaskSet):
|
@@ -4,11 +4,13 @@ UI extension hooks to track the sum of the content-length header in all
|
|
4
4
|
successful HTTP responses and display them in the web UI.
|
5
5
|
"""
|
6
6
|
|
7
|
+
from locust import HttpUser, TaskSet, between, events, task, web
|
8
|
+
|
7
9
|
import os
|
8
|
-
from time import time
|
9
10
|
from html import escape
|
10
|
-
from
|
11
|
-
|
11
|
+
from time import time
|
12
|
+
|
13
|
+
from flask import Blueprint, jsonify, make_response, render_template
|
12
14
|
|
13
15
|
|
14
16
|
class MyTaskSet(TaskSet):
|