Hnieef Posted July 16, 2004 Posted July 16, 2004 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 Quote
Arch4ngel Posted July 16, 2004 Posted July 16, 2004 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) Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
Arch4ngel Posted July 16, 2004 Posted July 16, 2004 Here is what I've done... it's always approximate but... it work best with search or long process which takes minutes to accomplish. 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]} Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
Hnieef Posted July 19, 2004 Author Posted July 19, 2004 thank arch4angel.. i'll try the code.. i let you know.. anywya thank again Quote
*Gurus* Derek Stone Posted July 19, 2004 *Gurus* Posted July 19, 2004 Enable tracing. Quote Posting Guidelines
Arch4ngel Posted July 19, 2004 Posted July 19, 2004 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 ? Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
*Gurus* Derek Stone Posted July 20, 2004 *Gurus* Posted July 20, 2004 http://msdn.microsoft.com/library/en-us/cpgenref/html/gngrfTraceSection.asp Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.