hacking new Lire filters and reports (was: Re: Average daily requests)
Joost van Baal
joostvb at logreport.org
Fri Jan 14 10:09:39 CET 2005
On Thu, Jan 13, 2005 at 11:44:10AM -0500, Brett Simpson wrote:
> I'm trying to figure out how to generate a count on average hourly and
> daily requests. I can see that an average is available for Compressed
> URLS and Files.
If a numeric operation like sum or avg is used in any Lire filter or report
specification, it can be used in any.
> Assuming the code is in place could I do something similar to this so
> that I can get the Average amount of requests per day. So it will
> average hourly requests and then for a daily request average.
>
> In requests-by-period.xml
> <lire:report-calc-spec>
> <lire:timegroup period="$period" label="Period">
> <lire:count name="request_total" label="Requests"/>
> <lire:count name="request_ratio" ratio="table" label="% Total"/>
> <lire:avg name="avg_requests" field="request_total" label="Avg"/>
> </lire:timegroup>
> </lire:report-calc-spec>
>
> If the averaging isn't available were can I look to get an idea of
> where I need to code in this extra functionality.
>
I believe your code could work; just try it and see. See also
Lire::Average(3pm).
BTW: you can test your www filters and reports by sticking them
somewhere under ~/.lire/www/filters/ and ~/.lire/www/reports/ : you
don't have to clutter your system with yet-untested stuff.
Bye,
Joost
--
. . http://logreport.com/
| '.| /^LogReport$/
| Lire http://logreport.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.logreport.org/pipermail/questions/attachments/20050114/aa3970fe/attachment.bin
More information about the Questions
mailing list