MartinFister
Programmer
Hi,
I've been experimenting a lot lately with the PerformanceCounter class created by Microsoft and am having a lot of trouble optimizing the speed of the operations. I've read all of the MSDN documents on the subject but unfortunately, they don't really go into details on the subject.
What I'm trying to do is to look at a server and measure the % processor time used by each of the threads. However, because there are over 100 threads being run on the server, querying each of them to obtain a sample takes over 1 minute. When I'm trying to get % processor time in 10 second intervals, this sort of latency is not acceptable.
In essence, can I get a batch process where it will contact the server once, obtain all of these values, and then return them together? Does anyone know a good way of doing this?
Thanks for your help!
I've been experimenting a lot lately with the PerformanceCounter class created by Microsoft and am having a lot of trouble optimizing the speed of the operations. I've read all of the MSDN documents on the subject but unfortunately, they don't really go into details on the subject.
What I'm trying to do is to look at a server and measure the % processor time used by each of the threads. However, because there are over 100 threads being run on the server, querying each of them to obtain a sample takes over 1 minute. When I'm trying to get % processor time in 10 second intervals, this sort of latency is not acceptable.
In essence, can I get a batch process where it will contact the server once, obtain all of these values, and then return them together? Does anyone know a good way of doing this?
Thanks for your help!