{"id":13398300,"url":"https://github.com/locustio/locust","last_synced_at":"2025-05-13T11:03:47.294Z","repository":{"id":37431728,"uuid":"1377867","full_name":"locustio/locust","owner":"locustio","description":"Write scalable load tests in plain Python 🚗💨","archived":false,"fork":false,"pushed_at":"2025-05-05T19:14:33.000Z","size":33951,"stargazers_count":26094,"open_issues_count":12,"forks_count":3052,"subscribers_count":422,"default_branch":"master","last_synced_at":"2025-05-05T20:50:30.743Z","etag":null,"topics":["benchmarking","hacktoberfest","http","load-generator","load-test","load-testing","load-tests","locust","performance","performance-testing","python"],"latest_commit_sha":null,"homepage":"https://locust.cloud","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/locustio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2011-02-17T11:08:03.000Z","updated_at":"2025-05-05T19:14:39.000Z","dependencies_parsed_at":"2023-10-26T10:40:20.750Z","dependency_job_id":"90c0237b-b836-4e58-b83b-ded61ce81c1f","html_url":"https://github.com/locustio/locust","commit_stats":null,"previous_names":[],"tags_count":168,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locustio%2Flocust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locustio%2Flocust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locustio%2Flocust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locustio%2Flocust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/locustio","download_url":"https://codeload.github.com/locustio/locust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253617966,"owners_count":21936896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmarking","hacktoberfest","http","load-generator","load-test","load-testing","load-tests","locust","performance","performance-testing","python"],"created_at":"2024-07-30T19:00:22.228Z","updated_at":"2025-05-13T11:03:47.004Z","avatar_url":"https://github.com/locustio.png","language":"Python","readme":"# Locust\n\n[![PyPI](https://img.shields.io/pypi/v/locust.svg)](https://pypi.org/project/locust/)\u003c!--![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Flocustio%2Flocust%2Fmaster%2Fpyproject.toml)--\u003e\n[![Downloads](https://pepy.tech/badge/locust/week)](https://pepy.tech/project/locust)\n[![GitHub contributors](https://img.shields.io/github/contributors/locustio/locust.svg)](https://github.com/locustio/locust/graphs/contributors)\n[![Support Ukraine Badge](https://bit.ly/support-ukraine-now)](https://github.com/support-ukraine/support-ukraine)\n\nLocust is an open source performance/load testing tool for HTTP and other protocols. Its developer-friendly approach lets you define your tests in regular Python code.\n\nLocust tests can be run from command line or using its web-based UI. Throughput, response times and errors can be viewed in real time and/or exported for later analysis.\n\nYou can import regular Python libraries into your tests, and with Locust's pluggable architecture it is infinitely expandable. Unlike when using most other tools, your test design will never be limited by a GUI or domain-specific language.\n\nTo get started right away, head over to the [documentation](http://docs.locust.io/en/stable/installation.html).\n\n## Features\n\n#### Write user test scenarios in plain old Python\n\nIf you want your users to loop, perform some conditional behaviour or do some calculations, you just use the regular programming constructs provided by Python. Locust runs every user inside its own greenlet (a lightweight process/coroutine). This enables you to write your tests like normal (blocking) Python code instead of having to use callbacks or some other mechanism. Because your scenarios are “just python” you can use your regular IDE, and version control your tests as regular code (as opposed to some other tools that use XML or binary formats)\n\n```python\nfrom locust import HttpUser, task, between\n\nclass QuickstartUser(HttpUser):\n    wait_time = between(1, 2)\n\n    def on_start(self):\n        self.client.post(\"/login\", json={\"username\":\"foo\", \"password\":\"bar\"})\n\n    @task\n    def hello_world(self):\n        self.client.get(\"/hello\")\n        self.client.get(\"/world\")\n\n    @task(3)\n    def view_item(self):\n        for item_id in range(10):\n            self.client.get(f\"/item?id={item_id}\", name=\"/item\")\n```\n\n#### Distributed \u0026 Scalable - supports hundreds of thousands of users\n\nLocust makes it easy to run load tests distributed over multiple machines. It is event-based (using [gevent](http://www.gevent.org/)), which makes it possible for a single process to handle many thousands concurrent users. While there may be other tools that are capable of doing more requests per second on a given hardware, the low overhead of each Locust user makes it very suitable for testing highly concurrent workloads.\n\n#### Web-based UI\n\nLocust has a user friendly web interface that shows the progress of your test in real-time. You can even change the load while the test is running. It can also be run without the UI, making it easy to use for CI/CD testing.\n\n\u003cpicture\u003e\n\u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/bottlenecked-server-light.png\" alt=\"Locust UI charts\" height=\"100\" width=\"200\"/\u003e\n\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/bottlenecked-server-dark.png\" alt=\"Locust UI charts\" height=\"100\" width=\"200\"/\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/bottlenecked-server-light.png\" alt=\"Locust UI charts\" height=\"100\" width=\"200\"/\u003e\n\u003c/picture\u003e\n\u003cpicture\u003e\n\u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/webui-running-statistics-light.png\" alt=\"Locust UI stats\" height=\"100\" width=\"200\"/\u003e\n\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/webui-running-statistics-dark.png\" alt=\"Locust UI stats\" height=\"100\" width=\"200\"/\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/webui-running-statistics-light.png\" alt=\"Locust UI stats\" height=\"100\" width=\"200\"/\u003e\n\u003c/picture\u003e\n\u003cpicture\u003e\n\u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/locust-workers-light.png\" alt=\"Locust UI workers\" height=\"100\" width=\"200\"/\u003e\n\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/locust-workers-dark.png\" alt=\"Locust UI workers\" height=\"100\" width=\"200\"/\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/locust-workers-light.png\" alt=\"Locust UI workers\" height=\"100\" width=\"200\"/\u003e\n\u003c/picture\u003e\n\u003cpicture\u003e\n\u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/webui-splash-light.png\" alt=\"Locust UI start test\" height=\"100\" width=\"200\"/\u003e\n\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/webui-splash-dark.png\" alt=\"Locust UI start test\" height=\"100\" width=\"200\"/\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/webui-splash-light.png\" alt=\"Locust UI start test\" height=\"100\" width=\"200\"/\u003e\n\u003c/picture\u003e\n\n#### Can test any system\n\nEven though Locust primarily works with web sites/services, it can be used to test almost any system or protocol. Just [write a client](https://docs.locust.io/en/latest/testing-other-systems.html#testing-other-systems) for what you want to test, or [explore some created by the community](https://github.com/SvenskaSpel/locust-plugins#users).\n\n## Hackable\n\nLocust's code base is intentionally kept small and doesn't solve everything out of the box. Instead, we try to make it easy to adapt to any situation you may come across, using regular Python code. There is nothing stopping you from: \n\n* [Send real time reporting data to TimescaleDB and visualize it in Grafana](https://github.com/SvenskaSpel/locust-plugins/blob/master/locust_plugins/dashboards/README.md)\n* [Wrap calls to handle the peculiarities of your REST API](https://github.com/SvenskaSpel/locust-plugins/blob/8af21862d8129a5c3b17559677fe92192e312d8f/examples/rest_ex.py#L87) \n* [Use a totally custom load shape/profile](https://docs.locust.io/en/latest/custom-load-shape.html#custom-load-shape)\n* [...](https://github.com/locustio/locust/wiki/Extensions)\n\n## Links\n\n* Documentation: [docs.locust.io](https://docs.locust.io)\n* Support/Questions: [StackOverflow](https://stackoverflow.com/questions/tagged/locust)\n* Github Discussions: [Github Discussions](https://github.com/orgs/locustio/discussions)\n* Chat/discussion: [Slack](https://locustio.slack.com) [(signup)](https://communityinviter.com/apps/locustio/locust)\n\n## Authors\n\n* Maintainer: [Lars Holmberg](https://github.com/cyberw)\n* UI: [Andrew Baldwin](https://github.com/andrewbaldwin44)\n* Original creator: [Jonatan Heyman](https://github.com/heyman)\n* Massive thanks to [all of our contributors](https://github.com/locustio/locust/graphs/contributors)\n\n## License\n\nOpen source licensed under the MIT license (see _LICENSE_ file for details).\n","funding_links":[],"categories":["语言资源库","Testing","Performance \u0026 Load Testing","Python","资源列表","\u003ca id=\"tag-dev\" href=\"#tag-dev\"\u003eDev\u003c/a\u003e","4. Load Generators and Synthetic Traffic","Python Frameworks and Tools","Load Impact Tools","Load generators","测试","Python Frameworks, Libraries, and Tools","Python (1887)","HarmonyOS","网络服务","http","📦 Modules/Packages","Web Testing","Application Recommendation","python","Tools","Python Learning Resources","Testing [🔝](#readme)","Awesome Python","Official Resources","The List of AI Testing Tools","3. AWS ML Only","Load Testing"],"sub_categories":["python",".NET","测试","\u003ca id=\"tag-dev-other\" href=\"#tag-dev-other\"\u003eOther Dev projects\u003c/a\u003e","Events \u0026 Problems","In-memory data grids","Tools","Interfaces","Windows Manager","网络服务_其他","Testing","🛠️ DevOps","E-Books","VS Code Extensions for Developer Productivity","Objective-C Tools, Libraries, and Frameworks","viii. Linear Regression","Mesh networks","JavaScript Libraries for Machine Learning","23. Locust","3.4. Training, Inference and MLOps"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocustio%2Flocust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocustio%2Flocust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocustio%2Flocust/lists"}