1

Hi is there any tool to find out the execution time of a method?

Because my application (asp.net web application) is running very slowly and I want to find out the method which is taking more time to respond or execute.

Thanks in advance jestges

jestges
  • 3,686
  • 24
  • 59
  • 95

2 Answers2

2

Just use the Stopwatch class

Stopwatch sw = Stopwatch.StartNew();
sw.Stop();
TGH
  • 38,769
  • 12
  • 102
  • 135
  • 1
    My application is having many pages. I dont think I can put this class in each and every method. Actually I'm looking for a tool which will read all my methods and provide me the response times. So that I can fine tune those methods in order to improve performance. Hope you understand – jestges Mar 21 '12 at 04:49
1

You need to use profiler which will show the execution time. Refer to Effective way of measuring method execution time for various option.

Community
  • 1
  • 1
Sachin Chavan
  • 5,578
  • 5
  • 49
  • 75