Difference between revisions of "File:QEMU KVM.png"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
(Number of patches from OpenVZ team, per week, accepted from mainline QEMU + KVM unit tests + KVM guest drivers)
 
(Vvs uploaded a new version of File:QEMU KVM.png)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
Number of patches from OpenVZ team,
+
Number of patches from OpenVZ team
per week, accepted from mainline
+
== Description ==
QEMU + KVM unit tests + KVM guest drivers
+
 
 +
This graph shows how many patches from OpenVZ developers were merged into mainstream QEMU + KVM, per each version.
 +
 
 +
It is drawn by gnuplot using the data set obtained from git repository.
 +
 
 +
== Source code ==
 +
=== Collect data ===
 +
Here is the script to produce the data for the graph, called <code>count</code>:
 +
 
 +
<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|virtuozzo.com|kuznet@|gorcunov@'
 +
 
 +
# 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
 +
}
 +
 
 +
count_total_patches() {
 +
git log --pretty=short --no-merges $1..$2 | grep -c '^commit '
 +
}
 +
 
 +
# Latest kernel
 +
latest=$(git tag | grep -v -- -rc | grep -F 'v1.' | \
 +
awk -F . '{print $2}' | sort -n | tail -n1)
 +
 
 +
# Find out if number of patches for HEAD is much more
 +
# than for latest -rc. If yes, use HEAD, otherwise -rc.:
 +
last_rc=$(git describe --abbrev=0)
 +
HEAD=$last_rc
 +
if ! test -z "$last_rc"; then
 +
much_more=10
 +
count_head=$(count_patches v1.$latest.0 HEAD)
 +
count_rc=$(count_patches v1.$latest.0 $last_rc)
 +
if test $count_head -gt $((count_rc+much_more)); then
 +
HEAD="HEAD  "
 +
fi
 +
fi
 +
 
 +
pv=''
 +
for v in $(git for-each-ref --sort='*authordate' --format='%(tag)' refs/tags |\
 +
grep -v -E -- '-rc|-tree|v2.6.11|\.[1-9]$') HEAD; do
 +
if [ -z "$pv" ]; then
 +
pv=$v
 +
continue
 +
fi
 +
 
 +
pd=$(get_tag_date $pv)
 +
d=$(get_tag_date $v)
 +
count_ours=$(count_patches $pv $v)
 +
count_total=$(count_total_patches $pv $v)
 +
if test "$count_ours" -gt 0; then
 +
echo $d $v " " $count_ours $count_total
 +
fi
 +
pv=$v
 +
done | sed 's/ /\t/g'
 +
</source></small>
 +
 
 +
=== Draw the graph ===
 +
 
 +
Here is the script to produce the graph. Note it calls the previous script under the name 'count'.
 +
<small><source lang="bash">
 +
#!/bin/sh
 +
 
 +
REPO=~/src/qemu/.git
 +
COUNT=$(pwd)/count
 +
OUT=$(pwd)/time.dat
 +
export GDFONTPATH=/usr/share/fonts/microsoft
 +
export GIT_DIR=$REPO
 +
 
 +
if test "$1" != "-f"; then
 +
echo "== 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 =="
 +
tail -n 2 $OUT
 +
fi
 +
 
 +
DATE=$(tail -n 1 $OUT | cut -f 1 | awk -F- '{print $2,$1,$3}')
 +
MAXY=$(awk 'BEGIN {max=0}; ($3 > max) {max=$3}; END {print max+80}' < time.dat)
 +
# GNU date is powerful!
 +
MAXX=$(date +%b-1-%Y --date='+2 months')
 +
 
 +
cat << EOF | gnuplot > plot.png
 +
set terminal png enhanced font "verdana,13" size 1600,1200
 +
 
 +
 
 +
set title "OpenVZ team QEMU 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 QEMU 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 '${OUT}' using 1:3 with linespoints pt 6 ps 1 lw 2 lt 2 notitle, \
 +
'' using 1:3:2 with labels left offset 0,5.5 rotate notitle, \
 +
'' using 1:3:3 with labels left offset 0.7,0 notitle
 +
 
 +
EOF
 +
</source></small>

Latest revision as of 10:23, 27 May 2020

Number of patches from OpenVZ team

Description[edit]

This graph shows how many patches from OpenVZ developers were merged into mainstream QEMU + KVM, per each version.

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

Source code[edit]

Collect data[edit]

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|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|virtuozzo.com|kuznet@|gorcunov@'

# 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
}

count_total_patches() {
	git log --pretty=short --no-merges $1..$2 | grep -c '^commit '
}

# Latest kernel
latest=$(git tag | grep -v -- -rc | grep -F 'v1.' | \
		awk -F . '{print $2}' | sort -n | tail -n1)

# Find out if number of patches for HEAD is much more
# than for latest -rc. If yes, use HEAD, otherwise -rc.:
last_rc=$(git describe --abbrev=0)
HEAD=$last_rc
if ! test -z "$last_rc"; then
	much_more=10
	count_head=$(count_patches v1.$latest.0 HEAD)
	count_rc=$(count_patches v1.$latest.0 $last_rc)
	if test $count_head -gt $((count_rc+much_more)); then
		HEAD="HEAD   "
	fi
fi

pv=''
for v in $(git for-each-ref --sort='*authordate' --format='%(tag)' refs/tags |\
		 grep -v -E -- '-rc|-tree|v2.6.11|\.[1-9]$') HEAD; do
	if [ -z "$pv" ]; then
		pv=$v
		continue
	fi

	pd=$(get_tag_date $pv)
	d=$(get_tag_date $v)
	count_ours=$(count_patches $pv $v)
	count_total=$(count_total_patches $pv $v)
	if test "$count_ours" -gt 0; then
		echo $d $v " " $count_ours $count_total
	fi
	pv=$v
done | sed 's/ /\t/g'

Draw the graph[edit]

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

#!/bin/sh

REPO=~/src/qemu/.git
COUNT=$(pwd)/count
OUT=$(pwd)/time.dat
export GDFONTPATH=/usr/share/fonts/microsoft
export GIT_DIR=$REPO

if test "$1" != "-f"; then
	echo "== 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 =="
	tail -n 2 $OUT
fi

DATE=$(tail -n 1 $OUT | cut -f 1 | awk -F- '{print $2,$1,$3}')
MAXY=$(awk 'BEGIN {max=0}; ($3 > max) {max=$3}; END {print max+80}' < time.dat)
# GNU date is powerful!
MAXX=$(date +%b-1-%Y --date='+2 months')

cat << EOF | gnuplot > plot.png
set terminal png enhanced font "verdana,13" size 1600,1200


set title "OpenVZ team QEMU 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 QEMU 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 '${OUT}' using 1:3 with linespoints pt 6 ps 1 lw 2 lt 2 notitle, \
	''	using 1:3:2 with labels left offset 0,5.5 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
current10:23, 27 May 2020Thumbnail for version as of 10:23, 27 May 20201,600 × 1,200 (35 KB)Vvs (talk | contribs)
11:20, 27 August 2018Thumbnail for version as of 11:20, 27 August 20181,600 × 1,200 (25 KB)Vvs (talk | contribs)27 aug 2018
09:52, 3 July 2018Thumbnail for version as of 09:52, 3 July 20181,600 × 1,200 (25 KB)Vvs (talk | contribs)
  • You cannot overwrite this file.

The following page links to this file:

Metadata