Click here to Skip to main content
15,881,831 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
Hi I have a project in asp.net (c#) and I want to get the execution time for each function, Is this possible?
if there is article about that help me
thanks
Posted

This[^] is what you could use in your methods to measure execution time.
 
Share this answer
 
Comments
yesotaso 30-May-11 14:14pm    
Good link +5. I was wondering what superiority holds using System.Diagnostics.StopWatch class has over using Environment.TickCount. I've read using DateTime class has some inaccuracy issues but I havent seen StopWatch vs TickCount comparison.
Sergey Alexandrovich Kryukov 30-May-11 15:50pm    
Accuracy, accuracy. Pay attention: you can inquire time resolution from this class.
Abhinav gets my 5, of course.
--SA
Abhinav S 31-May-11 2:11am    
Thanks SA.
Monjurul Habib 30-May-11 17:26pm    
nice link. my 5.
Abhinav S 31-May-11 2:09am    
Thank you.
You may consider using a profiler. Some good advices by 'the competitors': "What Are Some Good .NET Profilers?"[^] at Stack Overflow.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 30-May-11 15:51pm    
Surely useful recommendation, my 5. Do you recommend any particular profiler based on your own experience?
--SA
CPallini 30-May-11 15:57pm    
I haven't experience neither of profilers nor of .Net code development (after all I'm a Klingon developer).
Kim Togo 31-May-11 5:19am    
I use ANTS Performance Profiler from Redgate for profiler and it is really good :-)
Recommended!
Monjurul Habib 30-May-11 17:26pm    
nice link. my 5.
thatraja 30-May-11 22:26pm    
Yeah, That link contains a bunch. my 5!
Also I didn't use any & I'm going to try if anything free. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900