[drupal-devel] [feature] Add timing information to statistics page

Bèr Kessels drupal-devel at drupal.org
Wed May 11 21:34:05 UTC 2005


Issue status update for http://drupal.org/node/22623

 Project:      Drupal
 Version:      cvs
 Component:    statistics.module
 Category:     feature requests
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  Dries
 Updated by:   Bèr Kessels
 Status:       patch

I like the idea. a lot. But from the pdf it is not clear that timer
deals with the generation tilme o a page.


* Are we not boing too geeky here (again)? devel.module does farily
granual timing already. Is Joe User really waiting for timers on how
long it took to make a page. I think not.
* If we really want this in core, it should at least be made very clear
that this is the time it took to make a page. I presented the screenshot
to a client, as a small test. And just like i thought, his reaction was
" Wow, this is handy, I can now see how long a user spent at a certain
page. This will tell me what posts are actually read, and which are
only opened in a browser only to be closed right away". I almost made
the same mistake, but the geek in me told me to look at the code and
see that it is page generation times. Joe user will not ever look at
the code.
* What is the penalty. accesslog already is a heavy load table. Do we
really want aditional data in that table.
* We have access hooks (called after page is loaded) to do aditional
statistics magic. IT is not userd by anything else then the stats in
core. Why cant this go into an advanced stats module?




Bèr Kessels



Previous comments:
------------------------------------------------------------------------

May 11, 2005 - 21:05 : Dries

Attachment: http://drupal.org/files/issues/timer.patch (8.56 KB)

I extended the current timer_start() function in bootstrap.inc and added
two new function, timer_read() and timer_stop().  I've used these to
profile drupal.org.  (A small change will be needed to devel.module.)


I've also extended the accesslog-table to keep track of page generation
times.  The information is shown on the "top pages" page
(admin/logs/pages).  It shows each page's average page generation time,
and the total page generation time.  This lets one identify (i) slow
pages and (ii) resource heavy pages.  This is the most essential and
most useful information when tuning your Drupal site.


Please review, or I'll commit it as is.




------------------------------------------------------------------------

May 11, 2005 - 21:13 : Dries

Attachment: http://drupal.org/files/issues/timer.pdf (22 KB)

Screenshot.




------------------------------------------------------------------------

May 11, 2005 - 22:04 : Dries

Setting to patch.  Take a look at the patch + screenshot please.




------------------------------------------------------------------------

May 11, 2005 - 22:19 : moshe weitzman

looks ok ... note that there are some unrelated (i think) variable_set()
changes in the patch.




------------------------------------------------------------------------

May 11, 2005 - 22:20 : Amazon

It's great to have this level of logging granularity.


I am concerned that all the logging would add over head when having
multiple crawlers crawling the site during testing.  Would it be
possible to support batching the log entries and submitting them to the
database as batch query at set increments instead of for every page.


For example I routinely run several wget crawls for different roles
when testing an upgrade.  If I ran 5 crawlers and each of 10, 000+
pages were being crawled then I am concerned the performance would be
impacted.


I understand this isn't the intent of this patch but non intrusive
logging is important in generating accurate performance measurements.


Thank-you for your consideration.


Kieran




------------------------------------------------------------------------

May 11, 2005 - 22:20 : moshe weitzman

in the pdf, i think you are swapping 'total' and 'average' column
headers







More information about the drupal-devel mailing list