How much time does CPU spend in each method?

V

Vincent Vega

Hi,

I'd like to run my WinForms application through a series of tests and
determine where I can optimize my code. Is there an easy way for a brother
to tell which methods were called most frequently, or more importantly,
which methods took the largest fraction of CPU time to execute? This might
help me narrow down my focus a bit.

The only thing I can come up with is to use the DateTime class to
measure the number of "ticks" spent in each method -- but applying this
approach across hundreds of methods is insane. It occurs to me that perhaps
Visual Studio has an automated way of doing this. Any ideas?

You're the man,

Vincent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top