简体   繁体   中英

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. 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. 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.

IME, fiddler is the best tool for viewing http call behavior. Its timeline lets you view concurrency nicely.

The setting for changing the limit is in connectionManagement

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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