且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在负载/性能测试期间找到 IIS 模拟的平均并发用户数?

更新时间:2023-02-14 15:34:46

我可以在这里看到几个选项.

I can see a couple options here.

  1. 使用性能监视器获取当前数字或记录一整天并获取平均值.ASP.NET 有一个 Requests Current 计数器.根据此页面,经典 ASP 也有请求当前,但我自己从未使用过.

  1. Use Performance Monitor to get the current numbers or have it log all day and get an average. ASP.NET has a Requests Current counter. According to this page Classic ASP also has a Requests current, but I've never used it myself.

通过日志解析器运行 IIS 日志获取请求总数以及每个请求花费的时间.我在想,如果您知道每小时有多少请求以及每个请求花费了多长时间,您就可以获得并发运行的平均请求数.

Run the IIS logs through Log Parser to get the total number of requests and how long each took. I'm thinking that if you know how many requests come in each hour and how long each took, you can get an average of how many were running concurrently.

另外,请记住并发用户与服务器上的并发线程并不完全相同.一方面,在下载图像等内容时,每个用户将有多个线程处于活动状态.之后,当服务器空闲时,用户将在页面上停留几分钟.

Also, keep in mind that concurrent users isn't quite the same as concurrent threads on the server. For one, multiple threads will be active per user while content like images is being downloaded. And after that the user will be on the page for a few minutes while the server is idle.