diff --git a/tools/plot-timing.sh b/tools/plot-timing.sh index 4509d25..c7786b4 100755 --- a/tools/plot-timing.sh +++ b/tools/plot-timing.sh @@ -27,20 +27,24 @@ BEGIN { \ count[foo] = 0; \ } \ } \ - \ + +# for every line \ { \ accu[$2] += $3; \ count[$2]++; \ if (mini[$2] > $3) mini[$2] = $3; \ - if (maxi[$2] < $3) maxi[$2] = $3; \ + if (maxi[$2] < $3) maxi[$2] = $3; + last[$2] = $3 \ } \ \ END { \ for (foo=0; foo 0) { \ mean = accu[foo] / count[foo]; \ - printf "%4d %4f %4d %4d\n", foo, mean, \ - mini[foo], maxi[foo]; \ + printf "%4d %4f %4d %4d %4d\n", + foo, mean, + mini[foo], maxi[foo], + last[foo]; } \ } \ } \ @@ -57,9 +61,14 @@ gnuplot << __EOC__ set title "Séquence '${sequence}'" set xlabel "numéro de la trame" set ylabel "temps en secondes" - plot "/dev/shm/plot-timing.tmp" u 1:4 w l lc "#ff0000" t "maximum", \ - "/dev/shm/plot-timing.tmp" u 1:3 w l lc "#0000ff" t "minimum", \ - "/dev/shm/plot-timing.tmp" u 1:2 w l lc "#000000" t "moyenne", + plot "/dev/shm/plot-timing.tmp" u 1:4 w l \ + lc "#ff0000" t "maximum", \ + "/dev/shm/plot-timing.tmp" u 1:3 w l \ + lc "#0000ff" t "minimum", \ + "/dev/shm/plot-timing.tmp" u 1:2 w l \ + lc "#00ff00" t "moyenne", \ + "/dev/shm/plot-timing.tmp" u 1:5 w l \ + lc "#000000" t "last" __EOC__ convert -negate -level -33% $IMAGE WS/negatif.png