Question

I have a .NET WPF application which makes a large number of WebRequests to perform POST requests in numerous threads. I am trying to determine how much bandwidth my application uses.

I am aware of System.Net.NetworkInformation.IPv4InterfaceStatistics, but this isnt ideal since there will be other applications running on the system which will contribute to this value.

Adding the size of my POST requests and the responses they generate isn't ideal either because it wont take in to account the HTTP and TCP overhead.

And tunneling all the WebRequests though a proxy isnt ideal either because the latency it adds will impact the amount of bandwidth the application uses.

I've looked though the API documentation of the WebRequest class and nothing seems obvious. Is there any easy way to do this programmatically?

Was it helpful?

Solution

I suggest to use the built-in Windows Performance counters.

Lots of counters, lots of tools to analyze them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top