[PATCH] churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov
piranha at piranha.org.ua
Thu Oct 2 21:49:27 UTC 2008
On Fri, Oct 3, 2008 at 12:24 AM, Alexander Solovyov
<piranha at piranha.org.ua> wrote:
> # HG changeset patch
> # User Alexander Solovyov <piranha at piranha.org.ua>
> churn: generalisation, now it is possible to see statistics grouped by custom template
Example of usage:
=====
piranha at gtv ~/dev/hg/hg>hg stats|head
mpm at selenic.com 1908 ********************************
thomas at intevation.de 908 ***************
alexis at cecm.usp.br 533 ********
brendan at kublai.com 504 ********
benoit.boissinot at ens-lyon.org 479 ********
vadim.gelfer at gmail.com 476 *******
bos at serpentine.com 396 ******
pmezard at gmail.com 390 ******
dirkjan at ochtman.nl 186 ***
blacktrash at gmx.net 98 *
piranha at gtv ~/dev/hg/hg>hg stats -f "%Y"
2006 2408 *******************************************************************
2007 1775 *************************************************
2005 1611 ********************************************
2008 1248 **********************************
piranha at gtv ~/dev/hg/hg>hg stats -f "%Y" -l
2006 93586 *******************************************************************
2005 68937 *************************************************
2007 62422 ********************************************
2008 50617 ************************************
=====
Also it's nice to look at `hg stats -f "%H"` - displays graph of
activity during day. :-)
I'm not sure that I've chosen right way for grouping by user (it is
generalised in template parsing instead of being hard-coded like in
churn now), because templates are not usable now for grouping by
anything else. I can't invent anything except date, which is not very
usable without date formatting, so I've added another parameter for
that. At least there is almost no difference in running time:
=====
piranha at gtv ~/dev/hg/hg>hg stats -l
...
hg stats -l 61.54s user 0.92s system 99% cpu 1:02.50 total
piranha at gtv ~/dev/hg/hg>hg churn # this is old churn, before my patch
...
hg churn 61.02s user 0.82s system 99% cpu 1:01.85 total
=====
--
Alexander
More information about the Mercurial-devel
mailing list