开源的负载测试工具:locust

jopen 10年前

locust是一个采用Python开发的负载测试工具。使用Python代码定义用户行为,然后模拟数百万用户同时使用系统。

特性

  • Write user test scenarios in plain-old Python
    No need for clunky UIs or bloated XML, just code as you normally would. Based on coroutines instead of callbacks (aka boomerang code) allows code to look and behave like normal, blocking Python code.

  • Distributed & Scalable - supports hundreds of thousands of users
    Locust supports running load tests distributed over multiple machines. Being event based, even one Locust node can handle thousands of users in a single process. Part of the reason behind this is that even if you simulate that many users, not all are actively hitting your system. Often, users are idle figuring out what to do next. Request per second != number of users online.

  • Web-based UI
    Locust has a neat HTML+JS that shows all relevent test details in real-time. And since the UI is web-based, it's cross-platform and easily extendable.

  • Can test any system
    Even though Locust is web-oriented, it can be used to test almost any system. Just write a client for what ever you wish to test and swarm it with locusts! It's super easy!

  • Hackable
    Locust is very small and very hackable and we intend to keep it that way. All heavy-lifting of evented I/O and coroutines are delegated to gevent. The brittleness of alternative testing tools was the reason we created Locust.

screenshot.png


官网:http://locust.io/
github主页:https://github.com/locustio/locust