per-day hourly statistics

Roy T. Fielding (fielding@kiwi.ICS.UCI.EDU)
Fri, 21 Feb 1997 21:58:55 -0800


Dara Ghahremani writes:

>I'm wondering why the total daily requests computed by wwwstat is not
>equal to the sum of the hourly requests. Can someone explain why the code
>was written this way and how I could change it?

It is because there is more than one day being summarized.  It would
be rather messy to generate per-day hourly statistics, and might use
up more memory than you'd like, but it should be easy to program.

Basically, it would just be a matter of joining the hour key onto the
date, e.g.

    $hour = join(' ', $date, $hour);

and then fixing the print (and maybe sort) routines to do the right thing.

 ...Roy T. Fielding
    Department of Information & Computer Science    (fielding@ics.uci.edu)
    University of California, Irvine, CA 92697-3425    fax:+1(714)824-4056
    http://www.ics.uci.edu/~fielding/