eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; # $Id: plot 17177 1998-10-29 19:56:42Z levine $ # # Plots output from summarize. open (HIGH_LATENCY, "> h") || die "$0: unable to open \"h\""; open (LOW_LATENCY, "> l") || die "$0: unable to open \"l\""; while (<>) { if (/([\d\.]+) +([\d\.]+) +([\d\.]+) +([\d\.]+) +([\d\.]+)/) { $low_priority_threads = $1; $high_latency = $2; $high_jitter = $3; $low_latency = $4; $low_jitter = $5; print HIGH_LATENCY "$low_priority_threads $high_latency $high_jitter\n"; if ($low_priority_threads > 0) { print LOW_LATENCY "$low_priority_threads $low_latency $low_jitter\n"; } } } close HIGH_LATENCY; close LOW_LATENCY; open (GNUPLOT, "| gnuplot") || die "unable to open \"gnuplot\"\n"; print GNUPLOT "set terminal postscript eps color\n" . "set output \"/dev/null\"\n" . "set yrange [0:]\n" . "set grid ytics\n" . "set xlabel \"Number of Low priority Clients\"\n" . "set ylabel \"Latency per two-way request, microseconds\n" . "set linestyle 1 linetype 2 pointtype 2\n" . "set linestyle 2 linetype 1 pointtype 1\n" . " plot 'l' title \"Low Priority Clients\" with linespoints ls 2\n" . "replot 'h' title \"High Priority Client\" with linespoints ls 1\n" . "set yrange [] writeback\n" . "replot 'h' notitle with errorbars ls 1\n" . "set output \"plot.eps\"\n" . "set noautoscale y\n" . "replot 'l' notitle with errorbars ls 2\n"; close GNUPLOT; unlink 'h', 'l';