-1

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

levi
  • 3,451
  • 6
  • 50
  • 86

3 Answers3

2

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:

Community
  • 1
  • 1
Furqan Safdar
  • 16,260
  • 13
  • 59
  • 93
0

This could be it. Profiler for MVC and WebFormas as far as I know: http://www.hanselman.com/blog/NuGetPackageOfTheWeek9ASPNETMiniProfilerFromStackExchangeRocksYourWorld.aspx

Remy
  • 12,555
  • 14
  • 64
  • 104
0

You can use the Trace directive of Page.

<%@ Page Trace="true" %>

http://msdn.microsoft.com/en-us/library/94c55d08(v=vs.71).aspx

Oscar
  • 13,594
  • 8
  • 47
  • 75