Commit graph

8 commits

Author SHA1 Message Date
Thomas Hochstein b802bc3d29 groupstats.pl: Redo level (-l) query, gain speedup.
Do the work in the application, using two separate SQL
queries, instead of trying to optimize the single
query in vain ...

Thanks to Juliane. :)

Fixes #16.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-10-31 21:43:18 +01:00
Thomas Hochstein 404c1acdc8 groupstats.pl: Improve comments.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-10-31 21:39:20 +01:00
Thomas Hochstein 6b95accbb4 groupstats.pl: Refactor query handling.
Don't misuse variables:
- Push other binding vars to (new) @Params instead of
  filling up @GroupList with things it wasn't meant for.
- Replace generic @QueryPart by @QueryGroupList and
  @QueryThreshold, then build $WhereClause from that.
- Don't use $OrderClause for setting level (more or
  less than x), use (new) $Level instead.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-10-31 21:34:04 +01:00
Thomas Hochstein d8695b1c04 groupstats.pl: More input validation.
Set -o to 'pretty' for time periods.
Set -b to 10 if < 1.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-09-18 21:59:13 +02:00
Thomas Hochstein 2832c235b2 Introduce end-of-line normalization and add .gitattributes.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-09-18 20:53:31 +02:00
Thomas Hochstein 3430c89868 Add comments and POD.
Add comments NewsStats.pm
Add POD to install.pl
Add POD to feedlog.pl
Add POD and comments to gatherstats.pl
Add POD and comments to groupstats.pl, beautify code

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-09-18 20:47:32 +02:00
Thomas Hochstein 13c5a175ef groupstats.pl: Add handling of incompatible command line options.
-t/-l/-b are incompatible. Print warning, let -l take precedence
over -t and -b over both.

-q/-d are incompatible with -l and -b. Print warning, ignore
them.

For -l, only -o 'pretty' makes sense. Force that.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-09-18 20:45:33 +02:00
Thomas Hochstein 741336c210 Initial checkin of working branch.
Checkin of
- NewsStats.pm
- install/install.pl
- feedlog.pl
- gatherstats.pl
- groupstats.pl

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-09-18 20:44:56 +02:00