Difference between revisions of "A couple tricks for stats"
From Yade
Line 43: | Line 43: | ||
− | Lines changed per file type (one-liner), suggested meaningful types are "grep -E '*.cpp|*.hpp|* |
+ | Lines changed per file type (one-liner), suggested meaningful types are "grep -E '*\.cpp|*\.hpp|*\.rst|*\.cmake|*\.txt|*\.bib|*\.ipp|*\.in|*\.py'" or just "*\.rst" for doc: |
git log --after={2011-01-01} --format='%aN' | sort -u | while read name; do\ |
git log --after={2011-01-01} --format='%aN' | sort -u | while read name; do\ |
||
echo -en "$name\t"; git log --after={2011-01-01} --author="$name" |
echo -en "$name\t"; git log --after={2011-01-01} --author="$name" |
||
--pretty=tformat: --numstat | grep -E \ |
--pretty=tformat: --numstat | grep -E \ |
||
− | '*.cpp|*.hpp|* |
+ | '*\.cpp|*\.hpp|*\.rst|*\.cmake|*\.txt|*\.bib|*\.ipp|*\.in|*\.py' | awk '{ add += $1;\ |
subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done |
subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done |
||
'''Results 4 March 2015 (git.ef867c6af325):''' |
'''Results 4 March 2015 (git.ef867c6af325):''' |
||
+ | <nowiki> |
||
− | |||
− | + | Anton Gladky added lines 29506 removed lines 28747 total lines 759 |
|
− | + | Bruno Chareyre added lines 26566 removed lines 25583 total lines 983 |
|
− | + | Christian Jakob added lines 11352 removed lines 9946 total lines 1406 |
|
− | + | Chao Yuan added lines 7377 removed lines 6896 total lines 481 |
|
− | + | Luc Sibille added lines 4297 removed lines 2027 total lines 2270 |
|
− | + | Francois Kneib added lines 3264 removed lines 967 total lines 2297 |
|
− | + | Václav Šmilauer added lines 3228 removed lines 1119 total lines 2109 |
|
− | + | Jan Stránský added lines 2345 removed lines 1604 total lines 741 |
|
− | + | Jerome Duriez added lines 2183 removed lines 1315 total lines 868 |
|
− | + | Klaus Thoeni added lines 1983 removed lines 719 total lines 1264 |
|
− | + | Ning GUO added lines 1714 removed lines 0 total lines 1714 |
|
− | + | Luc Scholtes added lines 1441 removed lines 927 total lines 514 |
|
− | + | Donia Marzougui added lines 1253 removed lines 887 total lines 366 |
|
− | + | Burak Er added lines 935 removed lines 0 total lines 935 |
|
− | + | Emanuele Catalano added lines 928 removed lines 820 total lines 108 |
|
− | + | Chiara Modenese added lines 656 removed lines 254 total lines 402 |
|
− | + | Janek Kozicki added lines 503 removed lines 422 total lines 81 |
|
− | + | Raphael Maurin added lines 443 removed lines 57 total lines 386 |
|
− | + | Sergei Dorofeenko added lines 343 removed lines 449 total lines -106 |
|
− | + | T Sweijen added lines 297 removed lines 26 total lines 271 |
|
− | + | Dominik Boemer added lines 110 removed lines 0 total lines 110 |
|
− | + | Nolan Dyck added lines 109 removed lines 50 total lines 59 |
|
− | + | Alexander Eulitz added lines 54 removed lines 36 total lines 18 |
|
+ | fifthguy added lines 6 removed lines 1 total lines 5 |
||
+ | </nowiki> |
||
'''Commits to the documentation (rst only):''' |
'''Commits to the documentation (rst only):''' |
||
git log --after={2011-01-01} --format='%aN' | sort -u | while read name; do echo -en "$name\t";\ |
git log --after={2011-01-01} --format='%aN' | sort -u | while read name; do echo -en "$name\t";\ |
||
− | git log --after={2011-01-01} --author="$name" --pretty=tformat: --numstat | grep -E '*.rst' |\ |
+ | git log --after={2011-01-01} --author="$name" --pretty=tformat: --numstat | grep -E '*\.rst' |\ |
awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done |
awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done |
||
+ | <nowiki> |
||
− | |||
− | + | Václav Šmilauer added lines 898 removed lines 0 total lines 898 |
|
− | + | Bruno Chareyre added lines 650 removed lines 471 total lines 179 |
|
− | + | Anton Gladky added lines 572 removed lines 556 total lines 16 |
|
− | + | Jerome Duriez added lines 236 removed lines 32 total lines 204 |
|
− | + | Christian Jakob added lines 117 removed lines 57 total lines 60 |
|
− | + | Jan Stránský added lines 92 removed lines 59 total lines 33 |
|
− | + | Alexander Eulitz added lines 41 removed lines 23 total lines 18 |
|
− | + | Klaus Thoeni added lines 18 removed lines 17 total lines 1 |
|
− | + | Francois Kneib added lines 7 removed lines 3 total lines 4 |
|
− | + | Emanuele Catalano added lines 3 removed lines 3 total lines 0 |
|
− | + | Sergei Dorofeenko added lines 1 removed lines 1 total lines 0</nowiki> |
Latest revision as of 20:13, 4 March 2015
Number of lines per author in current HEAD (from stackoverflow):
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*?\((.*?)\s+[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n
Number of commits per author (all times):
git shortlog -sne
keep only commits on a time interval:
git shortlog --after ={2011-01-01} -sne
Results 4 March 2015 (git.ef867c6af325):
(emails removed) 806 Anton Gladky <gladky.anton|a|gmail.com> 541 Bruno Chareyre <bruno.chareyre|a|hmg.inpg.fr> 161 Christian Jakob <jakob|a|ifgt.tu-freiberg.de> 111 Jan Stránský <jan.stransky|a|fsv.cvut.cz> 99 Chao Yuan <chaoyuan2012|a|gmail.com> 99 Jerome Duriez <jerome.duriez|a|3sr-grenoble.fr> 51 Francois Kneib <francois.kneib|a|gmail.com> 35 Klaus Thoeni <klaus.thoeni|a|gmail.com> 25 Donia Marzougui <donia.marzougui|a|hmg.inpg.fr> 24 Václav Šmilauer <eudoxos|a|arcig.cz> 21 Chiara Modenese <c.modenese|a|gmail.com> 16 Emanuele Catalano <catalano|a|hmg.inpg.fr> 16 Luc Sibille <luc.sibille|a|3sr-grenoble.fr> 15 Alexander Eulitz <alexander.eulitz|a|iwf.tu-berlin.de> 15 Luc Scholtes <lscholtes63|a|gmail.com> 11 Janek Kozicki <janek|a|kozicki.pl> 9 Raphael Maurin <raph_maurin|a|hotmail.com> 9 Rémi Cailletaud <remi.cailletaud|a|hmg.inpg.fr> 9 Sergei Dorofeenko <sj2001|a|yandex.ru> 8 T Sweijen <thomasje100|a|outlook.com> 4 Nolan Dyck <ndyck|a|uwo.ca> 2 Ning GUO <ceguo|a|connect.ust.hk> 1 Burak Er <burak.er|a|btu.edu.tr> 1 Dominik Boemer <dominik.boemer|a|gmail.com> 1 fifthguy <tzfifthguy1|a|gmail.com>
Lines changed per file type (one-liner), suggested meaningful types are "grep -E '*\.cpp|*\.hpp|*\.rst|*\.cmake|*\.txt|*\.bib|*\.ipp|*\.in|*\.py'" or just "*\.rst" for doc:
git log --after={2011-01-01} --format='%aN' | sort -u | while read name; do\ echo -en "$name\t"; git log --after={2011-01-01} --author="$name" --pretty=tformat: --numstat | grep -E \ '*\.cpp|*\.hpp|*\.rst|*\.cmake|*\.txt|*\.bib|*\.ipp|*\.in|*\.py' | awk '{ add += $1;\ subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done
Results 4 March 2015 (git.ef867c6af325):
Anton Gladky added lines 29506 removed lines 28747 total lines 759 Bruno Chareyre added lines 26566 removed lines 25583 total lines 983 Christian Jakob added lines 11352 removed lines 9946 total lines 1406 Chao Yuan added lines 7377 removed lines 6896 total lines 481 Luc Sibille added lines 4297 removed lines 2027 total lines 2270 Francois Kneib added lines 3264 removed lines 967 total lines 2297 Václav Šmilauer added lines 3228 removed lines 1119 total lines 2109 Jan Stránský added lines 2345 removed lines 1604 total lines 741 Jerome Duriez added lines 2183 removed lines 1315 total lines 868 Klaus Thoeni added lines 1983 removed lines 719 total lines 1264 Ning GUO added lines 1714 removed lines 0 total lines 1714 Luc Scholtes added lines 1441 removed lines 927 total lines 514 Donia Marzougui added lines 1253 removed lines 887 total lines 366 Burak Er added lines 935 removed lines 0 total lines 935 Emanuele Catalano added lines 928 removed lines 820 total lines 108 Chiara Modenese added lines 656 removed lines 254 total lines 402 Janek Kozicki added lines 503 removed lines 422 total lines 81 Raphael Maurin added lines 443 removed lines 57 total lines 386 Sergei Dorofeenko added lines 343 removed lines 449 total lines -106 T Sweijen added lines 297 removed lines 26 total lines 271 Dominik Boemer added lines 110 removed lines 0 total lines 110 Nolan Dyck added lines 109 removed lines 50 total lines 59 Alexander Eulitz added lines 54 removed lines 36 total lines 18 fifthguy added lines 6 removed lines 1 total lines 5
Commits to the documentation (rst only):
git log --after={2011-01-01} --format='%aN' | sort -u | while read name; do echo -en "$name\t";\ git log --after={2011-01-01} --author="$name" --pretty=tformat: --numstat | grep -E '*\.rst' |\ awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done Václav Šmilauer added lines 898 removed lines 0 total lines 898 Bruno Chareyre added lines 650 removed lines 471 total lines 179 Anton Gladky added lines 572 removed lines 556 total lines 16 Jerome Duriez added lines 236 removed lines 32 total lines 204 Christian Jakob added lines 117 removed lines 57 total lines 60 Jan Stránský added lines 92 removed lines 59 total lines 33 Alexander Eulitz added lines 41 removed lines 23 total lines 18 Klaus Thoeni added lines 18 removed lines 17 total lines 1 Francois Kneib added lines 7 removed lines 3 total lines 4 Emanuele Catalano added lines 3 removed lines 3 total lines 0 Sergei Dorofeenko added lines 1 removed lines 1 total lines 0