Get Page Size and Execution Time - How?

M

mid

Hello!
Some sites have information about page rendered size and render time. I
could not find anything about this for asp.net pages. I would like to get
this data (option in web.config or something) in order to evaluate
performance issues.
Any samples or directions?
thanks
mid
 
J

John Saunders

mid said:
Hello!
Some sites have information about page rendered size and render time. I
could not find anything about this for asp.net pages. I would like to get
this data (option in web.config or something) in order to evaluate
performance issues.

A simple way would be to turn on page tracing, though you'll probably find
this to be overkill.

John Saunders
 
M

mid

Thanks John, I'm aware of page tracing but on a production page that would
no be a good idea...
I would like to have kind of a user control. I search the vs.net help files
trying to find examples of wrapping the tracing options into some variables
but no luck.
Thanks
mid
 
J

John Saunders

mid said:
Thanks John, I'm aware of page tracing but on a production page that would
no be a good idea...
I would like to have kind of a user control. I search the vs.net help
files
trying to find examples of wrapping the tracing options into some
variables
but no luck.

Look into the BeginRequest and EndRequest events in global.asax for the
timing. As to the page size, there's some ability to change which stream (or
textwriter) a page writes to. You could have it write to a StringWriter,
then check the size, then send the output to the original stream.

I don't recall the details of this, but look at the properties of the Page
class, including perhaps thing inherited from TemplateControl and Control.

John Saunders

P.S. And when you find out, be sure to tell us here!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top