In short, is there any way to know the very code that is currently
hogging the CPU?
I've written an application which continously GETting web pages using
HttpWebRequest' s asynchronous methods (it only GETs responses
(BegingGetRespo nse,EndGetRespo nse), not reads the stream contents).
I've read articles about asynchronous request operations. I aborted
timed out requests based on the article. ( http://www.developerfusion.co.uk/show/4654/
) And, I kept the number of HttpWebRequets waiting for response below
30. But still, as the execution time passes, the CPU usage is
gradually increasing. If memory consumption gets gradually high, then
I might think it's due to some memory leak, but what about this
situation? At first the CPU usage was below 5% but about 6 minutes
later, it gets as high as 40%. I don't know why it increases when it
is doing the same work in a loop.
I've downloaded the CLR profiler from Microsft and tried it, but it
only showed memory usages and allocations, not the CPU usage. When my
application is hogging 40% of the CPU, is it possible for me to know
which operation is consuming it? Since my code is simple, I think it
is probably one of the underlying HttpWebRequest or other BCL classes.
Thanks for your help.