Skip to contentSkip to conversation

fio_generate_plots with setable resolution

PATCH Applied Martin Steigerwald 2 participants 3 messages Aug 5, 2011 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fio_generate_plots with setable resolution

Hi!

Use

fio_generate_plots somename 1600 1200

or something like that.

Just quit and dirty ATM. On interest I can make up a patch for inclusion in fio package *after* I finished my article ;).

Fonts tend to get small on hi resolutions. It seems gnuplot takes them as pixel not points/dots (related to some dots per inch).

Ciao,

Signature · 2 lines
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7
fio_generate_plots renamed from usr/bin/fio_generate_plots +13 -4
@@ -15,6 +15,15 @@
 
 TITLE=$1
 
+# set resolution
+if [ "$2"x != "x" -a "$3"x != "x" ]; then
+	XRES="$2"
+	YRES="$3"
+else
+	XRES=800
+	YRES=600
+fi
+
 PLOT_LINE=""
 for i in *bw.log; do
 	if [ ! -r $i ]; then
@@ -30,7 +39,7 @@
 
 if [ "$PLOT_LINE"x != "x" ]; then
 	echo Making bw logs
-	echo "set title 'Bandwidth - $TITLE'; set xlabel 'time (msec)'; set ylabel 'KB/sec'; set terminal png; set output '$TITLE-bw.png'; plot " $PLOT_LINE | $GNUPLOT -
+	echo "set title 'Bandwidth - $TITLE'; set xlabel 'time (msec)'; set ylabel 'KB/sec'; set terminal png size $XRES,$YRES; set output '$TITLE-bw.png'; plot " $PLOT_LINE | $GNUPLOT -
 fi
 
 PLOT_LINE=""
@@ -48,7 +57,7 @@
 
 if [ "$PLOT_LINE"x != "x" ]; then
 	echo Making slat logs $PLOT_LINE
-	echo "set title 'Submission latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png; set output '$TITLE-slat.png'; plot " $PLOT_LINE | $GNUPLOT -
+	echo "set title 'Submission latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png size $XRES,$YRES; set output '$TITLE-slat.png'; plot " $PLOT_LINE | $GNUPLOT -
 fi
 
 PLOT_LINE=""
@@ -66,7 +75,7 @@
 
 if [ "$PLOT_LINE"x != "x" ]; then
 	echo Making clat logs $PLOT_LINE
-	echo "set title 'Completion latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png; set output '$TITLE-clat.png'; plot " $PLOT_LINE | $GNUPLOT -
+	echo "set title 'Completion latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png size $XRES,$YRES; set output '$TITLE-clat.png'; plot " $PLOT_LINE | $GNUPLOT -
 fi
 
 PLOT_LINE=""
@@ -84,5 +93,5 @@
 
 if [ "$PLOT_LINE"x != "x" ]; then
 	echo Making lat logs $PLOT_LINE
-	echo "set title 'Latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png; set output '$TITLE-lat.png'; plot " $PLOT_LINE | $GNUPLOT -
+	echo "set title 'Latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png size $XRES,$YRES; set output '$TITLE-lat.png'; plot " $PLOT_LINE | $GNUPLOT -
 fi
Applied
#1 lore raw
Quoted 6 lines · Martin Steigerwald

Hi!

Use

fio_generate_plots somename 1600 1200

Quoted 7 lines

or something like that.

Just quit and dirty ATM. On interest I can make up a patch for inclusion in fio package *after* I finished my article ;).

Fonts tend to get small on hi resolutions. It seems gnuplot takes them as pixel not points/dots (related to some dots per inch).

Thanks, applied with usage print updated (and 1024x768 default res, the old 800x600 is pretty small).

Signature · 1 line
Jens Axboe
#2 lore raw

Am Freitag, 5. August 2011 schrieb Jens Axboe:

Quoted 9 lines · Martin Steigerwald
Quoted 8 lines

Hi!

Use

fio_generate_plots somename 1600 1200

or something like that.

Quoted 8 lines
Quoted 5 lines

Just quit and dirty ATM. On interest I can make up a patch for inclusion in fio package *after* I finished my article ;).

Fonts tend to get small on hi resolutions. It seems gnuplot takes them as pixel not points/dots (related to some dots per inch).

Thanks, applied with usage print updated (and 1024x768 default res, the old 800x600 is pretty small).

Thanks, needs a manpage update as well. Lets see maybe next week.

Ciao,

Signature · 2 lines
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7