2
Answers

Trace Performance of application

I have an application build in asp.net(Web Form).Now i want to monitor various methods execution time without make much changes to the code.
Is there any way so that we can  figure out the performance issues.Thanks in advance.
Answers (2)
0
Sujeet Suman
NA 5.5k 199.6k 9y
Rajeev please once go through following link:
 
http://www.codeproject.com/Articles/116358/TraceNet-Trace-method-level-performance-for-DLLs-i 
http://www.red-gate.com/products/dotnet-development/ants-performance-profiler/walkthrough 
http://www.codeproject.com/Articles/10210/Tracing-web-application-with-ASP-NET
 
 
0
Manas Mohapatra
NA 29.3k 3.3m 9y
Hi Rajeev,
 
Here are couple of methods: 
 
Option 1 :
You can use Trace concept to know method execution time.
 
Just enable Trace="True" property in aspx page. 
<%@ Page Language="c#" AutoEventWireup="False" Trace="True"
Codebehind="TraceTest.aspx.cs" Inherits="TracingExample.Test"%>
 
Then run the page you can see output in bottom of the page. From there you can analyse which method is taking how much time. It displays Page_Load(), Page_Render(), etc...
 
Secondly if you want to trace user defined functions then you can use Trace.Write("your message"). This message will display in browser.
 
 
Option 2: 
You can use stopwatch class to measure application performance.