title: How to log web page on-load time & page size
body: <p>I am developing web application using tapestry framework</p>
  
  <p>I want to log each individual pages on-load time &amp; page size:</p>
  
  <p>I used pageAttached, Detached methods like below:</p>
  
  <pre><code>void pageAttached() {
      pageLoadStartupTime = System.currentTimeMillis();
  }
  
  void pageDetached() {
      logger.info("Info: page on-load time: " + 
         Util.getPageOnLoadTime(pageLoadStartupTime, System.currentTimeMillis())));
  }
  
  public static long getPageOnLoadTime(long start, long end) {
       return end-start;
  }
  </code></pre>
  
  <p>This gives some 300ms - 400ms,
  However in the UI the same page in browser, I checked the page on-load time using firebug option it shows 900ms</p>
  
  <p>It reveals that firebug shows the images loading, js, css &amp; other external calls</p>
  
  <p>Can anyone tell me how to log page size?
  &amp; is the way correct to log page loading time?</p>
  
  <p>Regards, 
  Karthi. </p>