Difference between revisions of "A couple tricks for stats"

From Yade

Line 7: Line 7:
   
 
git shortlog -sne
 
git shortlog -sne
  +
  +
keep only commits on a time interval:
  +
  +
git shortlog --after ={2011-01-01} -sne
  +
  +
'''Results 4 March 2015 (git.ef867c6af325):'''
  +
<nowiki>
  +
(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></nowiki>
  +
  +
   
 
Lines changed per file type (one-liner), suggested meaningful types are "grep -E '*.cpp|*.hpp|*.in|*.rst|*.cmake|*.txt|*.bib|*.ipp'" or just "*.rst" for doc:
 
Lines changed per file type (one-liner), suggested meaningful types are "grep -E '*.cpp|*.hpp|*.in|*.rst|*.cmake|*.txt|*.bib|*.ipp'" or just "*.rst" for doc:
Line 43: Line 78:
 
Václav Šmilauer added lines: 2494, removed lines: 734, total lines: 1760
 
Václav Šmilauer added lines: 2494, removed lines: 734, total lines: 1760
   
'''*.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";\

Revision as of 19:36, 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|*.in|*.rst|*.cmake|*.txt|*.bib|*.ipp'" 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|*.in|*.rst|*.cmake|*.txt|*.bib|*.ipp' | 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):

  Alexander Eulitz        added lines: 54, removed lines: 36, total lines: 18
  Anton Gladky    added lines: 28036, removed lines: 29436, total lines: -1400
  Bruno Chareyre  added lines: 187459, removed lines: 188748, total lines: -1289
  Burak Er        added lines: 935, removed lines: 0, total lines: 935
  Chao Yuan       added lines: 7377, removed lines: 6896, total lines: 481
  Chiara Modenese added lines: 656, removed lines: 254, total lines: 402
  Christian Jakob added lines: 7639, removed lines: 4943, total lines: 2696
  Dominik Boemer  added lines: , removed lines: , total lines: 
  Donia Marzougui added lines: 1253, removed lines: 887, total lines: 366
  Emanuele Catalano       added lines: 928, removed lines: 820, total lines: 108
  Francois Kneib  added lines: 3181, removed lines: 930, total lines: 2251
  Janek Kozicki   added lines: 345, removed lines: 385, total lines: -40
  Jan Stránský    added lines: 1511, removed lines: 1249, total lines: 262
  Jerome Duriez   added lines: 1543, removed lines: 810, total lines: 733
  Klaus Thoeni    added lines: 1143, removed lines: 466, total lines: 677
  Luc Scholtes    added lines: 1484, removed lines: 920, total lines: 564
  Luc Sibille     added lines: 4586, removed lines: 2027, total lines: 2559
  Ning GUO        added lines: 8255, removed lines: 0, total lines: 8255
  Nolan Dyck      added lines: 109, removed lines: 50, total lines: 59
  Raphael Maurin  added lines: 443, removed lines: 57, total lines: 386
  Rémi Cailletaud added lines: 84, removed lines: 36, total lines: 48
  Sergei Dorofeenko       added lines: 233, removed lines: 312, total lines: -79
  T Sweijen       added lines: 297, removed lines: 26, total lines: 271
  Václav Šmilauer added lines: 2494, removed lines: 734, total lines: 1760

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
  Alexander Eulitz        added lines: 41, removed lines: 23, total lines: 18 
  Anton Gladky    added lines: 577, removed lines: 558, total lines: 19
  Bruno Chareyre  added lines: 655, removed lines: 471, total lines: 184
  Christian Jakob added lines: 117, removed lines: 57, total lines: 60
  Emanuele Catalano       added lines: 3, removed lines: 3, total lines: 0
  Francois Kneib  added lines: 7, removed lines: 3, total lines: 4
  Jan Stránský    added lines: 92, removed lines: 59, total lines: 33
  Jerome Duriez   added lines: 236, removed lines: 32, total lines: 204
  Klaus Thoeni    added lines: 18, removed lines: 17, total lines: 1
  Sergei Dorofeenko       added lines: 1, removed lines: 1, total lines: 0
  Václav Šmilauer added lines: 898, removed lines: 0, total lines: 898