[mpich] MPICH primary repository branch, master, updated. v3.2-212-gb406734
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "MPICH primary repository". The branch, master has been updated via b406734328a0e11abe988edd390cc7654f4e7d81 (commit) from ee52b6b8ae093174384e7fc3e8da990ab1a6e0ac (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.mpich.org/mpich.git/commitdiff/b406734328a0e11abe988edd390cc7654f... commit b406734328a0e11abe988edd390cc7654f4e7d81 Author: Pavan Balaji <[email protected]> Date: Fri Feb 19 17:43:41 2016 -0600 maint: improvements to the git-conflicts script. Display probability of collision in the next year, which is a more "human understandable" metric than the (currently) low number for the next commit. No reviewer. diff --git a/maint/git-conflicts.bash b/maint/git-conflicts.bash index 780c535..019d510 100755 --- a/maint/git-conflicts.bash +++ b/maint/git-conflicts.bash @@ -1,6 +1,7 @@ #! /bin/bash max_abbrev=12 +scale=10 total=`git rev-list --all | wc -l` @@ -8,7 +9,7 @@ echo "Conflicts:" echo "Format: [abbrev length]: number of conflicts / total number of refs (percentage conflicts)" for ((x = 1 ; x <= ${max_abbrev} ; x++)) ; do conflicts=`git rev-list --all --abbrev=$x --abbrev-commit | sort | uniq -D -w$x | wc -l` - percent=`echo "scale=8 ; 100 * $conflicts / $total" | bc | awk '{ printf("%1.2f\n", $0); }'` + percent=`echo "scale=$scale ; 100 * $conflicts / $total" | bc | awk '{ printf("%1.2f\n", $0); }'` echo " [$x]: $conflicts / $total ($percent %)" if test "$conflicts" = "0" ; then break ; fi done @@ -22,10 +23,22 @@ done ## but if it is online, it must be true, of course. ;-) ## +min_abbrev=$x + echo echo "Probability of collision on your next commit:" echo "Format: [abbrev length]: probability of collision" -for ((; x <= ${max_abbrev} ; x++)) ; do - percent=`echo "scale=8 ; 100 * ($total) / (16 ^ $x)" | bc | awk '{ printf("%1.4f\n", $0); }'` +for ((x = ${min_abbrev}; x <= ${max_abbrev} ; x++)) ; do + percent=`echo "scale=$scale ; 100 * ($total) / (16 ^ $x)" | bc | awk '{ printf("%1.4f\n", $0); }'` + echo " [$x]: $percent %" +done + +commits_last_year=`git rev-list --all --since="1 year ago" | wc -l` + +echo +echo "Probability of collision in the next year (based on commits last year):" +echo "Format: [abbrev length]: probability of collision" +for ((x = ${min_abbrev}; x <= ${max_abbrev} ; x++)) ; do + percent=`echo "scale=$scale ; 100 * (1 - ((1 - ($total / (16 ^ $x))) ^ ${commits_last_year}))" | bc | awk '{ printf("%1.4f\n", $0); }'` echo " [$x]: $percent %" done ----------------------------------------------------------------------- Summary of changes: maint/git-conflicts.bash | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) hooks/post-receive -- MPICH primary repository
participants (1)
-
noreply@mpich.org