Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

File:Kernel patches stats.png

686 bytes added, 15:55, 4 May 2008
Collect data: Updated script
=== Collect data ===
Here is the script to produce the data for the graph, called <code>count</code>:
<small><source lang="bash">
#!/bin/sh
latest# Whose patches to countPAT=$(git tag '@openvz.org| grep -v -- -rc @parallels.com| tail -n1 @sw.ru| sed -e 's/^@swsoft.*\com|@sw.\(com.*\)$/\1/sg|adobriyan@|kuznet@')((latest++))
# Return the date of the given tag, in a format usable by gnuplot
get_tag_date() {
echo $(git show $1 | egrep ^Date: | head -n1) | sed 's/^Date: ... \(.*\) [-+]....$/\1/' | sed 's/ ..:..:..//' | sed 's/ /-/g'} # Count the number of patches whose authors match $PAT,# for the period between two given git tagscount_patches() { git log --pretty=short --no-merges $1..$2 | egrep '^Author: ' | egrep $PAT | wc -l
}
# What is the latest kernel patch number (i.e. x in 2.6.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.last_rc=$(git tag | tail -n 1 | grep -- -rc)HEAD=$last_rcif ! test -z "$last_rc"; then much_more=15 count_head=$(count_patches v2.6.$latest HEAD) count_rc=$(count_patches v2.6.$latest $last_rc) if test $count_head -gt $((count_rc+much_more)); then HEAD="HEAD " fifi # We start from 2.6.12 -- the first kernel available in gitfor f in $(seq 13 $((latest+1))); do v1=v2.6.$((f-1)) d1=$(get_tag_date $v1) if [ $f = -gt $latest ]; then v2="$HEAD " else v2=v2.6.$f fi d2=$(get_tag_date $v2) echo -n count=$(count_patches $d2 v1 $v2 ) if test " $count"-gt 0; then git log --pretty=short --no-merges echo $v1..d2 $v2 | grep 'Author:' | egrep \" " $count fi '@openvz.org|@parallels.com|@sw.ru|@swsoft.com|@sw.com.sg|adobriyan@|kuznet@' | wc -l
done | sed 's/ /\t/g'
 
</source></small>