[PATCH] fio_generate_plots with setable resolution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7
--- /usr/bin/fio_generate_plots	2011-08-03 14:30:09.000000000 +0200
+++ fio_generate_plots	2011-08-05 16:28:37.966057883 +0200
@@ -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

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux