X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=tools%2Fplot%2Fmath.gpm;h=0a2aff56cf01c3ef857a0a8591569dd9f8c95c74;hp=a01f5a0de6a610c0188de1c2d94cbc65a4c17da7;hb=11822c0bcc03ebcb893bfcb6490c8a1422fcd28e;hpb=45213f1b15f820e6791118b7200a1185e2af7d87 diff --git a/tools/plot/math.gpm b/tools/plot/math.gpm index a01f5a0d..0a2aff56 100644 --- a/tools/plot/math.gpm +++ b/tools/plot/math.gpm @@ -1,15 +1,32 @@ # This Gnuplot file has been generated by eNovance +if (exists("ARGC") && ARGC > 5) \ + found_args = 1; \ +else if (strlen("$$#") < 3 && "$#" > 5) \ + found_args = 1; \ + ARG1 = "$0"; \ + ARG2 = "$1"; \ + ARG3 = "$2"; \ + ARG4 = "$3"; \ + ARG5 = "$4"; \ + ARG6 = "$5"; \ +else \ + found_args = 0; \ + print "Aborting: could not find all arguments"; \ + exit -set title '$0' +avg_num = ARG6 + 0 +avg_str = sprintf("%g", avg_num) + +set title ARG1 set terminal png size 1280,1024 -set output '$3.png' +set output ARG4 . '.png' set palette rgbformulae 7,5,15 set style line 100 lt 7 lw 0.5 set style fill transparent solid 0.9 noborder set auto x -set ylabel '$4' +set ylabel ARG5 set xlabel "Disk" set yrange [0:] set style data histogram @@ -22,4 +39,4 @@ set xtics axis out set xtic rotate by 45 scale 0 font ",8" autojustify set xtics offset 0,-1 border -5,1,5 set style line 1 lt 1 lw 3 pt 3 linecolor rgb "green" -plot '$1' using 2:xtic(1) ti col, $5 w l ls 1 ti 'Global average value ($5)' +plot ARG2 using 2:xtic(1) ti col, avg_num w l ls 1 ti 'Global average value (' . avg_str . ')'