Changes

Jump to: navigation, search

File:Kernel patches stats.png

383 bytes added, 19:38, 26 January 2012
Updated to 3.x kernel series
<small><source lang="bash">
#!/bin/sh
# Whose patches to count
PAT='@openvz.org|@parallels.com|@sw.ru|@swsoft.com|@sw.com.sg|adobriyan@|kuznet@'
# 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 branch
# We start from 2.6.12 -- the first kernel available in git
# and end on 2.6.39 -- the last kernel on 2.6 branch
for f in $(seq 13 40); do
v1=v2.6.$((f-1))
d1=$(get_tag_date $v1)
if [ $f -gt 39 ]; then
v2=$HEAD
else
v2=v2.6.$f
fi
d2=$(get_tag_date $v2)
count=$(count_patches $v1 $v2)
if test "$count" -gt 0; then
echo $d2 $v2 " " $count
fi
done | sed 's/ /\t/g'
# New 3.x kernel branch# What is the latest kernel patch number (i.e. x in 2.63.x)
latest=$(git tag | grep -v -- -rc | tail -n1 | sed -e 's/^.*\.\(.*\)$/\1/')
# Find out if number of patches for HEAD is much more
# than for latest -rc. If yes, use HEAD, otherwise -rc.
if ! test -z "$last_rc"; then
much_more=15
count_head=$(count_patches v2.6v3.$latest HEAD) count_rc=$(count_patches v2.6v3.$latest $last_rc)
if test $count_head -gt $((count_rc+much_more)); then
HEAD="HEAD "
fi
# We start from 23.6.12 -- the first kernel available in git0for f in $(seq 13 1 $((latest+1))); do v1=v2.6v3.$((f-1))
d1=$(get_tag_date $v1)
if [ $f -gt $latest ]; then
v2=$HEAD
else
v2=v2.6v3.$f
fi
d2=$(get_tag_date $v2)
echo $d2 $v2 " " $count
fi
done | sed 's/ /\t/g'
</source></small>
4
edits

Navigation menu