]> git.ozlabs.org Git - next-scripts/commitdiff
do_stats: create the mail message as well
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Jul 2015 05:58:00 +0000 (15:58 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Jul 2015 05:58:00 +0000 (15:58 +1000)
do_stats

index 9b70bb43e2918ae5dff032abe1a5714300f7f14f..9ae1c263067dd59a9debf3304b56c276058bd6ff 100755 (executable)
--- a/do_stats
+++ b/do_stats
@@ -18,7 +18,7 @@ git rev-list --no-merges $base..$next | sort >$sd/$next.sha1s
 git rev-list --no-merges $base..$rc | sort >$sd/$rc.sha1s
 
 # filter out the common commits
-comm -12 $sd/$next.sha1s $sd/$rc.sha1s >$sd/common_sha1s
+comm -12 $sd/$next.sha1s $sd/$rc.sha1s >$sd/common_sha1
 comm -23 $sd/$next.sha1s $sd/$rc.sha1s >$sd/$next.sha1s.1
 comm -13 $sd/$next.sha1s $sd/$rc.sha1s >$sd/$rc.sha1s.1
 
@@ -47,3 +47,82 @@ join -v 1 -i -j 1 -t '|' $sd/$next.subj $sd/$rc.subj |
        sed 's/^.*|//' >$sd/$next.sha1s.3
 join -v 2 -i -j 1 -t '|' $sd/$next.subj $sd/$rc.subj |
        sed 's/^.*|//' >$sd/$rc.sha1s.3
+
+nrc=$(wc -l <$sd/$rc.sha1s)
+nnext=$(wc -l <$sd/$next.sha1s)
+ncommsha1=$(wc -l <$sd/common_sha1)
+ncommid=$(wc -l <$sd/common_id)
+ncommsubj=$(wc -l <$sd/common_subj)
+ncomm=$((ncommsha1+ncommid+ncommsibj))
+pcomm=$((ncomm*100/nrc))
+
+cat <<EOF
+Hi all,
+
+As usual, the executive friendly graph is at
+http://neuling.org/linux-next-size.html :-)
+
+(No merge commits counted, $next was the first linux-next after
+the merge window opened.)
+
+EOF
+printf "%-50s %5d\n" "Commits in $rc (relative to $base):" $nrc
+printf "%-50s %5d\n" "Commits in $next:" $nnext
+printf "%-50s %5d\n" "Commits with the same SHA1:" $ncommsha1
+printf "%-50s %5d (1)\n" "Commits with the same patch_id:" $ncommid
+printf "%-50s %5d (1)\n" "Commits with the same subject line:" $ncommsubj
+
+cat <<EOF
+
+(1) not counting those in the lines above.
+
+EOF
+
+printf "%-50s %5d %2d%%\n" "So commits in -rc1 that were in $next:" $ncomm $pcomm
+
+cat <<EOF
+
+Some breakdown of the list of extra commits (relative to $next)
+in -rc1:
+
+Top ten first word of commit summary:
+
+$(git log --no-walk --stdin --pretty="format:%s" <$sd/$rc.sha1s.3 |
+       sed -e 's/^\[//;s/[]:( /,;].*$//' |
+       tr 'A-Z' 'a-z' | sort | uniq -c | sort -nr | head -n 10)
+
+Top ten authors:
+
+$(git log --no-walk --stdin --pretty="format:%aE" <$sd/$rc.sha1s.3 |
+       tr 'A-Z' 'a-z' | sort | uniq -c | sort -nr | head -n 10)
+
+Top ten commiters:
+
+$(git log --no-walk --stdin --pretty="format:%cE" <$sd/$rc.sha1s.3 |
+       tr 'A-Z' 'a-z' | sort | uniq -c | sort -nr | head -n 10)
+
+There are also $(wc -l <$sd/$next.sha1s.3) commits in $next that didn't make it into
+$rc.
+
+Top ten first word of commit summary:
+
+$(git log --no-walk --stdin --pretty="format:%s" <$sd/$next.sha1s.3 |
+       sed -e 's/^\[//;s/[]:( /,;].*$//' |
+       tr 'A-Z' 'a-z' | sort | uniq -c | sort -nr | head -n 10)
+
+Top ten authors:
+
+$(git log --no-walk --stdin --pretty="format:%aE" <$sd/$next.sha1s.3 |
+       tr 'A-Z' 'a-z' | sort | uniq -c | sort -nr | head -n 10)
+
+Some of Andrew's patches are fixes for other patches in his tree (and
+have been merged into those).
+
+Top ten commiters:
+
+$(git log --no-walk --stdin --pretty="format:%cE" <$sd/$next.sha1s.3 |
+       tr 'A-Z' 'a-z' | sort | uniq -c | sort -nr | head -n 10)
+
+Those commits by me are from the quilt series (mainly Andrew's mmotm
+tree).
+EOF