昨天,今天,明天,每天的每天,你是否都多懂得一点点...

星期二, 七月 02, 2019

Use fiddler to do quick load testing

I rewrote my Telegram draw bot @fengdrawbot using nodejs express recently. Although I  used async-lock in the critical piece of code.  It didn't work well. The code draw multiple times if many people join the draw at the same time and reach the threshold number.

To debug this, I need a tool to simulate the heavy load in a short period of time. I tried Postman's runner,  it only runs the requests sequentially, which doesn't meet my purpose.

As I only need to simulate around 10 requests sent simultaneously, Fiddler fit this role very well. I used its composer to generate the request, then sent it.  The response came back correctly. I then selected the request and pressed "R" on the keyboard to resend it a few more times. Now I have around 10 same request in fiddler's history. I then selected all these 10 requests with "Shift" key + mouse. Then I pressed R to rerun all these requests simultaneously, issue reproduced.

Ok, now I have to debug and find out the problem then fix it.













--
Feng

没有评论:

其它博客地址

此博客的同步博客地址: http://fengnz.wordpress.com
这里进入我的MSN SPACE.