I've a website hosted on windows hosting IIS 7.5. How can I measure server side (C#) executing time?.. Is it possible to get it without IIS?
I need some tools, software or online tools
I've a website hosted on windows hosting IIS 7.5. How can I measure server side (C#) executing time?.. Is it possible to get it without IIS?
I need some tools, software or online tools
Yes you can measure the execution time of server-side by Stopwatch class.
Stopwatch measures time elapsed. It is useful for micro-benchmarks in code optimization. It can perform routine and continuous performance monitoring. The Stopwatch type, found in System.Diagnostics, is useful in many contexts.
You can also find some examples of its usage here
It uses a higher resolution / precision than DateTime.Now
.
You can also check out these related links:
Environment.TickCount vs DateTime.Now
Is DateTime.Now the best way to measure a function's performance?
DateTime
is good enough for precision to the second probably but anything beyond that I would recommend StopWatch
.
If you looking for Profilers, there are some good Open Source profilers like:
This could be it. Profiler for MVC and WebFormas as far as I know: http://www.hanselman.com/blog/NuGetPackageOfTheWeek9ASPNETMiniProfilerFromStackExchangeRocksYourWorld.aspx
You can use the Trace directive of Page.
<%@ Page Trace="true" %>
http://msdn.microsoft.com/en-us/library/94c55d08(v=vs.71).aspx