An old question, but in the meantime (starting with the .Net framework 4.0) a new solution is available. You need to enable ARM (application domain resource monitoring). From now on, you can request information about the total processor time consumed, memory usage, etc.
See Microsoft documentation here
BjΓΆrn boxstart
source share