Difference between revisions of "A couple tricks for stats"

From Yade

 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:
 
git shortlog -sne
 
git shortlog -sne
   
  +
keep only commits on a time interval:
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 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|*\.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|*.in|*.rst|*.cmake|*.txt|*.bib|*.ipp' | awk '{ add += $1;\
+
'*\.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):'''
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
 
 
'''*.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>
 
Alexander Eulitz added lines: 41, removed lines: 23, total lines: 18
+
Václav Šmilauer added lines 898 removed lines 0 total lines 898
Anton Gladky added lines: 577, removed lines: 558, total lines: 19
+
Bruno Chareyre added lines 650 removed lines 471 total lines 179
Bruno Chareyre added lines: 655, removed lines: 471, total lines: 184
+
Anton Gladky added lines 572 removed lines 556 total lines 16
Christian Jakob added lines: 117, removed lines: 57, total lines: 60
+
Jerome Duriez added lines 236 removed lines 32 total lines 204
Emanuele Catalano added lines: 3, removed lines: 3, total lines: 0
+
Christian Jakob added lines 117 removed lines 57 total lines 60
Francois Kneib added lines: 7, removed lines: 3, total lines: 4
+
Jan Stránský added lines 92 removed lines 59 total lines 33
Jan Stránský added lines: 92, removed lines: 59, total lines: 33
+
Alexander Eulitz added lines 41 removed lines 23 total lines 18
Jerome Duriez added lines: 236, removed lines: 32, total lines: 204
+
Klaus Thoeni added lines 18 removed lines 17 total lines 1
Klaus Thoeni added lines: 18, removed lines: 17, total lines: 1
+
Francois Kneib added lines 7 removed lines 3 total lines 4
Sergei Dorofeenko added lines: 1, removed lines: 1, total lines: 0
+
Emanuele Catalano added lines 3 removed lines 3 total lines 0
Václav Šmilauer added lines: 898, removed lines: 0, total lines: 898
+
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