page generation in asp.net

Hnieef

Newcomer
Joined
Apr 9, 2004
Messages
5
hai everybody..

how can i detect page generation when i load my page..

like php page.
example

"Page Generation: 4.811 Seconds".

hope some one know bout it..

thank you
 
Well ... you might save time information at the start of the loading and save time information at the end... however... I'm sure there's something more accurate than that. I'll go to my job this morning and I'll find you a solution :p

(Addict even at home ! :p)
 
Here is what I've done... it's always approximate but... it work best with search or long process which takes minutes to accomplish.

C#:
private[/color][/size][size=2] [/size][size=2][color=#0000ff]void[/color][/size][size=2] Page_Load([/size][size=2][color=#0000ff]object[/color][/size][size=2] sender, System.EventArgs e)[/size]
[size=2]{[/size]
[size=2]DateTime d1 = DateTime.Now;[/size]
// A LONG PROCESS HERE OR ANY PROCESS
[size=2]DateTime d2 = DateTime.Now;[/size]
[size=2]TimeSpan t = d2 - d1;[/size]
[size=2]Response.Write(t.Minutes + ":" + t.Seconds + ":" + t.Milliseconds);[/size]
[size=2]}
 
I'm interested in this feature Derek... as I found a temporary solution... I would like to know more about Tracing (which could be more effective).

Could you give us more detail or maybe some code snippet ?
 
Back
Top