File:Kernel patches stats.png

From OpenVZ Linux Containers Wiki

Jump to: navigation, search


Contents

[edit] Description

This graph shows how many patches from OpenVZ developers were merged into mainstream Linux kernel, per each kernel version.

It is drawn by gnuplot using the data set obtained from kernel git repository.

[edit] Source code

[edit] Collect data

Here is the script to produce the data for the graph, called count:

#!/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() {
	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 tags
count_patches() {
	git log --pretty=short --no-merges $1..$2 |
		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
# Transition: patches from 2.6.39 to 3.0
d2=$(get_tag_date v3.0)
count=$(count_patches v2.6.39 v3.0)
echo $d2 v3.0 " " $count
 
# What is the latest kernel patch number (i.e. x in 3.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_rc
if ! test -z "$last_rc"; then
	much_more=15
	count_head=$(count_patches v3.$latest HEAD)
	count_rc=$(count_patches v3.$latest $last_rc)
	if test $count_head -gt $((count_rc+much_more)); then
		HEAD="HEAD   "
	fi
fi
 
# We start from 3.0
for f in $(seq 1 $((latest+1))); do
	v1=v3.$((f-1))
	d1=$(get_tag_date $v1)
	if [ $f -gt $latest ]; then
		v2=$HEAD
	else
		v2=v3.$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'

[edit] Draw the graph

Here is the script to produce the graph. Note it calls the previous script under the name 'count'.

#!/bin/sh
 
if test "$1" != "-f"; then
	git checkout master
	git pull
	sh count > time.dat
fi
 
DATE=$(tail -n 1 time.dat | cut -f 1 | awk -F- '{print $2,$1,$3}')
MAXY=$(awk 'BEGIN {max=0}; ($3 > max) {max=$3}; END {print max+50}' < 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 "verdanab,20" 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}"
 
unset xlabel
set xdata time
set timefmt "%b-%d-%Y"
set format x "%b\n%Y"
set grid xtics mxtics noytics
 
set xrange [ : "${MAXX}" ]
set yrange [ 0 : ${MAXY} ]
set ylabel "Number of patches from OpenVZ team,\n per kernel release, accepted into mainstream"
 
set border 3		# no lines at right and top
set xtics nomirror	# no tics at top
set ytics nomirror	# no tics at right
 
plot 'time.dat' using 1:3 with linespoints pt 6 ps 1 lw 2 lt 2 notitle, \
	''	using 1:3:2 with labels left offset 0,1 rotate notitle, \
	''	using 1:3:3 with labels left offset 0.7,0 notitle
 
EOF

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current20:48, 19 March 2012Thumbnail for version as of 20:48, 19 March 20121,600×1,200 (47 KB)Glic3rinu (Talk | contribs) (kernel 3.3 released (c/r patches))
19:51, 26 January 2012Thumbnail for version as of 19:51, 26 January 20121,600×1,200 (47 KB)Glic3rinu (Talk | contribs) (now 3.0 is displayed too)
19:39, 26 January 2012Thumbnail for version as of 19:39, 26 January 20121,600×1,200 (46 KB)Glic3rinu (Talk | contribs) (v3.3-rc1)
12:08, 20 March 2011Thumbnail for version as of 12:08, 20 March 20111,600×1,200 (47 KB)Glic3rinu (Talk | contribs) (2.6.38 release)
11:48, 2 August 2010Thumbnail for version as of 11:48, 2 August 20101,600×1,200 (45 KB)Glic3rinu (Talk | contribs) (2.6.35 released)
17:54, 1 March 2010Thumbnail for version as of 17:54, 1 March 20101,600×1,200 (44 KB)Glic3rinu (Talk | contribs)
17:52, 1 March 2010Thumbnail for version as of 17:52, 1 March 20101,600×1,200 (38 KB)Glic3rinu (Talk | contribs) (Reverted to version as of 08:50, 14 July 2008)
01:59, 30 January 2010Thumbnail for version as of 01:59, 30 January 20101,600×1,200 (44 KB)Glic3rinu (Talk | contribs)
08:50, 14 July 2008Thumbnail for version as of 08:50, 14 July 20081,600×1,200 (38 KB)Kir (Talk | contribs) (2.6.26 released)
12:27, 5 June 2008Thumbnail for version as of 12:27, 5 June 20081,600×1,200 (39 KB)Kir (Talk | contribs) (v2.6.26-rc5)
08:46, 19 May 2008Thumbnail for version as of 08:46, 19 May 20081,600×1,200 (40 KB)Kir (Talk | contribs)
07:14, 4 May 2008Thumbnail for version as of 07:14, 4 May 20081,600×1,200 (39 KB)Kir (Talk | contribs) (Updated to include v2.6.26-rc1)
10:15, 17 April 2008Thumbnail for version as of 10:15, 17 April 20081,600×1,200 (38 KB)Kir (Talk | contribs) (updated)
23:01, 28 March 2008Thumbnail for version as of 23:01, 28 March 20081,600×1,200 (36 KB)Kir (Talk | contribs) (updated version)
08:49, 11 March 2008Thumbnail for version as of 08:49, 11 March 20081,600×1,200 (34 KB)Kir (Talk | contribs)
22:37, 1 March 2008Thumbnail for version as of 22:37, 1 March 2008800×600 (11 KB)Kir (Talk | contribs)
09:21, 27 February 2008Thumbnail for version as of 09:21, 27 February 2008600×400 (7 KB)Kir (Talk | contribs) (no border, no tics at right and top, no xlabel)
16:34, 26 February 2008Thumbnail for version as of 16:34, 26 February 2008600×400 (7 KB)Kir (Talk | contribs)

The following 2 pages link to this file:

Personal tools
Namespaces
Variants
Actions
Navigation
Sites
Toolbox