简体   繁体   English

如何在python中为异步进程编写压力测试脚本

[英]How to write a stress test script for asynchronous processes in python

I have a web application running on django, wherein an end user can enter a URL to process. 我有一个在django上运行的Web应用程序,最终用户可以输入URL进行处理。 All the processing tasks are offloaded to a celery queue which sends notification to the user when the task is completed. 将所有处理任务卸载到芹菜队列,该芹菜队列在任务完成时将通知发送给用户。

I need to stress test this app with the goals. 我需要对目标进行压力测试。

  • to determine breaking points or safe usage limits 确定断点或安全使用限制
  • to confirm intended specifications are being met 确认符合预期的规格
  • to determine modes of failure (how exactly a system fails) 确定故障模式(系统如何完全故障)
  • to test stable operation of a part or system outside standard usage 测试超出标准用法的部件或系统的稳定运行

How do I go about writing my script in Python, given the fact that I also need to take the offloaded celery tasks into account as well. 考虑到我还需要考虑卸载的芹菜任务,我该如何用Python编写脚本。

I think there is no need to write your own stress testing script. 我认为没有必要编写自己的压力测试脚本。

I have used www.blitz.io for stress testing. 我已经使用www.blitz.io进行压力测试。 It is set up in minutes, easy to use and it makes beautiful graphs. 它只需几分钟即可设置,易于使用,并且可以绘制精美的图形。

It has a 14 day trial so you just can test the heck out of your system for 14 days for free. 它具有14天的试用期,因此您可以免费试用14天的系统。 This should be enough to find all your bottlenecks. 这应该足以找到您的所有瓶颈。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM