简体   繁体   English

如何查看服务器发出的并发HTTP请求的数量?

[英]How can I view the number of concurrent HTTP requests being made by the server?

I am using a third party API to query data asynchronously. 我正在使用第三方API异步查询数据。 Here is an example of my code: 这是我的代码示例:

private void AsyncDataLoad() {
    Task[] tasks = new Task[6] {
        Task.Factory.StartNew(() => FetchSomeStuff1()),
        Task.Factory.StartNew(() => FetchSomeStuff2()),
        Task.Factory.StartNew(() => FetchSomeStuff3()),
        Task.Factory.StartNew(() => FetchSomeStuff4()),
        Task.Factory.StartNew(() => FetchSomeStuff5()),
        Task.Factory.StartNew(() => FetchSomeStuff6())
    };

    Task.WaitAll(tasks);
}

How can I view how many requests I have open at one time? 如何查看一次打开的请求数量? By default I think there is a limitation to the number of concurrent requests I can have open on one domain and I would like to change this. 默认情况下,我认为我可以在一个域上打开的并发请求数受到限制,我想对此进行更改。 But, I want to be able to prove this is the fact before trying to make any changes. 但是,我想能够证明这是事实,然后再尝试进行任何更改。

My development box is on Windows 7 Enterprise if that helps for any tool suggestions. 我的开发盒位于Windows 7 Enterprise上,如果有帮助的话,可以提供任何建议。 I tried using PerfMon, but, it didn't seem like any properties available for monitoring with that tool were picking up HTTP requests made by the server. 我尝试使用PerfMon,但是似乎没有任何可用于该工具监视的属性正在拾取服务器发出的HTTP请求。

IME, fiddler is the best tool for viewing http call behavior. 输入法,提琴手是查看http呼叫行为的最佳工具。 Its timeline lets you view concurrency nicely. 它的时间表可以让您很好地查看并发性。

The setting for changing the limit is in connectionManagement 更改限制的设置在connectionManagement中

http://msdn.microsoft.com/en-us/library/fb6y0fyc.aspx http://msdn.microsoft.com/zh-CN/library/fb6y0fyc.aspx

如果您只需要自己手动查看(而不是通过程序检查),则可以使用SysInternals的TCPView

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

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