如何在本地测试并发? [英] How to test concurrency locally?
本文介绍了如何在本地测试并发?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在本地测试并发的最佳方法是什么?即我想测试10个并发命中。我知道像 Blitz 这样的服务。但是,我试图找到一个更简单的方法来本地测试对抗竞争条件。
Whats the best way to test concurrency locally? i.e. i want to test 10 concurrent hits. I am aware of services like Blitz. However, I am trying to find a simpler way of doing it locally to test against race conditions.
任何想法? Via curl may?
Any ideas? Via Curl maybe?
推荐答案
查看Apache Bench( ab
)。基本用法很简单:
Check out Apache Bench (ab
). Basic usage is dead simple:
ab -n 100 -c 10 http://your.application
这篇关于如何在本地测试并发?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文