i need to capture the time a page takes to process. Need to store the time at which the request reaches, and then the time the request completes. so basically what I need to log the following information
you can use Trace="true"
at page markup to view how much time your page is taking to process
Ashutosh Pathak
Blog: http://catchcode.blogspot.com Please mark it as answer if it helps, as clicking on the button can save time of others :)
MCP,MCAD,MCSD,MCTS
khushboo_Nay...
Member
150 Points
210 Posts
Capture the time a page takes to process
Mar 21, 2012 09:03 AM|LINK
Hello All,
i need to capture the time a page takes to process. Need to store the time at which the request reaches, and then the time the request completes. so basically what I need to log the following information
1. request received at
2. URL
3. processed at
4. duration in milli seconds
Plz help me as soon as possible
Thanks,
Khushboo Nayak
ramiramilu
All-Star
95493 Points
14106 Posts
Re: Capture the time a page takes to process
Mar 21, 2012 09:11 AM|LINK
Trace="true" in your page directive should give you some stats...
also you can use FireBug/Fiddler to capture clientside request and response times...
Thanks,
JumpStart
Ashutosh Pat...
Contributor
5737 Points
1105 Posts
Re: Capture the time a page takes to process
Mar 21, 2012 09:11 AM|LINK
you can use Trace="true" at page markup to view how much time your page is taking to process
Blog: http://catchcode.blogspot.com
Please mark it as answer if it helps, as clicking on the button can save time of others :)
MCP,MCAD,MCSD,MCTS
Dave Sussman
All-Star
37716 Points
5005 Posts
ASPInsiders
MVP
Re: Capture the time a page takes to process
Mar 21, 2012 09:12 AM|LINK
See http://www.codedigest.com/Articles/ASPNET/121_Display_Request_Processing_Time_in_ASPNet_pages.aspx
Adil Babu
Member
471 Points
141 Posts
Re: Capture the time a page takes to process
Mar 21, 2012 09:18 AM|LINK
hi.....
the best way is to start the timer as early as possible, and stop and record the time as late as possible in the page lifecycle.
1)we can start the timer earlier by:-
private int startTime; protected void Page_Init(object sender, EventArgs e) { startTime = Environment.TickCount; }protected void Page_PreRender(object sender, EventArgs e) { int endTime = Environment.TickCount; double executionTime = (double)(endTime - startTime) / 1000.0; lblLabel.Text = "Page Execution time is " + executionTime + " seconds."; }Adil Babu
Please mark as Answer, if it benefits you