Changes

Jump to: navigation, search

File:Kernel patches stats.png

32 bytes removed, 03:30, 24 March 2014
Source code: updated the scripts
<small><source lang="bash">
#!/bin/sh
# Whose patches to count
#PAT='@openvz.org|@parallels.com|@sw.ru|@swsoft.com|@sw.com.sg|kuznet@'#PAT='@openvz.org|@parallels.com|@sw.ru|@swsoft.com|@sw.com.sg|adobriyan@|kuznet@|gorcunov@'PAT='@openvz.org|@parallels.com|@sw.ru|@swsoft.com|@sw.com.sg|kuznet@|gorcunov@'
# Return the date of the given tag, in a format usable by gnuplot
get_tag_date() {
sed 's/ ..:..:..//' | sed 's/ /-/g'
}
# Count the number of patches whose authors match $PAT,
# for the period between two given git tags
egrep '^Author: ' | egrep $PAT | wc -l
}
# Old 2.6 kernel branchcount_total_patches() {# We start from 2.6.12 -- the first kernel available in git# and end on 2.6.39 log -- the last kernel on 2.6 branchfor f in $(seq 13 39); do v1pretty=v2.6.$((fshort --1)) d1=$(get_tag_date $v1) if [ $f no-gt 39 ]; then v2=merges $HEAD else v2=v21.6.$f fi d2=$(get_tag_date $v2) count=$(count_patches $v1 $v2) if test "$count" 2 | grep -gt 0; then echo $d2 $v2 " " $count fi done | sed c 's/ /\t/g^commit ' } # New Latest 3.x kernel branch# Transition: patches from 2.6.39 to 3.0d2=$(get_tag_date v3.0)count=$(count_patches v2.6.39 v3.0)echo $d2 "v3.0" " " $count | sed 's/ /\t/g' # What is the latest kernel patch number in 3.xlatestlatest3=$(git tag | grep -v -- -rc | tail -n1 | sed -e 's/^.*\.\(.*\)$/\1/') latest3=$(git tag | grep -v -- -rc | grep -F 'v3.' | \ awk -F . '{print $2}' | sort -n | tail -n1)# Latest 2.6.x kernellatest26=39 
# Find out if number of patches for HEAD is much more
# than for latest -rc. If yes, use HEAD, otherwise -rc.:last_rc=$(git tag | tail describe -n 1 | grep -- -rcabbrev=0)
HEAD=$last_rc
if ! test -z "$last_rc"; then
much_more=1510 count_head=$(count_patches v3.$latest latest3 HEAD) count_rc=$(count_patches v3.$latest latest3 $last_rc)
if test $count_head -gt $((count_rc+much_more)); then
HEAD="HEAD "
fi
fi
# We start from 3.0pv=''for f v in $(seq 1 $(git for-each-ref --sort='*authordate' --format='%(latest+1)tag)' refs/tags |\ grep -v -E -- '-rc|-tree|v2.6.11')HEAD; do v1=v3.$((f-1)) d1=$(get_tag_date $v1) if [ $f -gt z "$latest pv" ]; then v2pv=$HEAD elsev v2=v3.$fcontinue
fi
  pd=$(get_tag_date $pv) d2d=$(get_tag_date $v2v) countcount_ours=$(count_patches $v1 pv $v2v) count_total=$(count_total_patches $pv $v) if test "$countcount_ours" -gt 0; then echo $d2 d $v2 v " " $countcount_ours $count_total
fi
pv=$v
done | sed 's/ /\t/g'
</source></small>
<small><source lang="bash">
#!/bin/sh
 
REPO=~/git/linux/.git
COUNT=$(pwd)/count
OUT=$(pwd)/time.dat
export GDFONTPATH=/usr/share/fonts/microsoft
export GIT_DIR=$REPO
if test "$1" != "-f"; then
git checkout masterecho "== Previous (old) stats ==" tail -n 2 $OUT # Update the repo and count new stats (cd $REPO && cd .. && git pull) && sh $COUNT > $OUT echo "== New stats ==" sh count > time.dattail -n 2 $OUT
fi
DATE=$(tail -n 1 time.dat $OUT | cut -f 1 | awk -F- '{print $2,$1,$3}')MAXY=$(awk 'BEGIN {max=0}; ($3 > max) {max=$3}; END {print max+5080}' < time.dat)
# GNU date is powerful!
MAXX=$(date +%b-1-%Y --date='+2 months')
export GDFONTPATH=/usr/share/fonts/msttcorefonts/
cat << EOF | gnuplot > plot.png
set terminal png enhanced font "verdanabverdana,2013" size 1600,1200#set terminal png enhanced transparent font "verdanab,14" size 1200,600#set terminal svg enhanced font "verdanab,8" size 800,600
set title "OpenVZ team kernel patches progress as of ${DATE}"
set ytics nomirror # no tics at right
plot 'time.dat${OUT}' using 1:3 with linespoints pt 6 ps 1 lw 2 lt 2 notitle, \ '' using 1:3:2 with labels left offset 0,1 5.5 rotate notitle, \
'' using 1:3:3 with labels left offset 0.7,0 notitle
EOF
</source></small>

Navigation menu