locked
Determining the size of each page request? RRS feed

  • Question

  • User-1656895382 posted
    Can anyone suggest a good approach to measuring how much (in kilobytes) each page that is rendered amounts to? I'm thinking that an HttpHandler or ISAP filter is the right method, but have no idea how to determine how how much each request is taking. SPecifically, I want to determine the total amount of bandwidth sent to a given user for one page hit (including images, text etc.) Can anyone kindly point me in the right direction? Much appreciated! nuge
    Wednesday, February 25, 2004 3:20 AM

All replies

  • User-1023901339 posted
    Did you try the different control variables in control panel -> admin tools -> performance, under asp.net? There are so many different, I am sure you can find one that tells you just what you need. I think you can read the value of these parameters from code as well. ---------- MIC2000
    Monday, April 5, 2004 2:16 PM
  • User-732283392 posted
    First, you certainly don't need an ISAP filter. I would use an HttpModule to check the length of pages because you want to check all the pages' length (I think?). If you wanted to check just an individual page's size, then i'd use an HttpHandler and use a special extension for the page itself by changing it from .aspx to .whatever, that way you don't incur the hit of checking all pages' length in the HttpModule. Anyway, depending on where you want to implement the check, all you have to do is get the current context of the httpapplication and check the Request.ContentLength property. This will give you the size of the request. Your other option is to use a simple tool, like WebLog Expert Lite (free), and just turn on the logging option in IIS to check for the stats you want to look at and then use the tool to get the bandwidth being used, what pages are being accessed, images most requested, etc. etc. It's a very good (and easy to use) tool.
    Monday, April 5, 2004 3:27 PM
  • User-1391363652 posted
    You can't accurately figure out the total length of a page including images, etc, because those are not handled by the pipeline by default. You need an external tool (ISAPI or a third-party add-on) for this. Look at the packets when you request a web page. It's not only the aspx itself that constitutes the request. It's also images, css, js, you name it. They are retrieved after the page is loaded and it's usually done so by the browser on multiple threads.
    Monday, April 5, 2004 4:24 PM
  • User-1240517566 posted
    Don't IIS logs extract total bytes served to a request? Jake
    Tuesday, April 6, 2004 11:14 AM