summaryrefslogtreecommitdiff
path: root/TAO/performance-tests/Cubit/TAO/MT_Cubit/plot
blob: 06f4cb606c35cb5472488fa57bc6971f290d4547 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}'
    & eval 'exec perl -w -S $0 $argv:q'
    if 0;

# $Id$
#
# 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';