Difference between revisions of "A couple tricks for stats"

From Yade

Line 7: Line 7:
   
 
git shortlog -sne
 
git shortlog -sne
  +
  +
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
  +
  +
'''*.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

Revision as of 19:15, 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

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

*.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