2 # (C) Hans Wolfgang Loidl, October 1995
3 #############################################################################
4 # Time-stamp: <Thu Oct 26 1995 18:30:54 Stardate: [-31]6498.64 hwloidl>
6 # Usage: AVG [options] <gr-file>
8 # A quich hack to get avg runtimes of different spark sites. Similar to SPLIT.
11 # -s <list> ... a perl list of spark names; the given <gr-file> is scanned
12 # for each given name in turn and granularity graphs are
13 # generated for each of these sparks
14 # -O ... use gr2RTS and RTS2gran instead of gran-extr;
15 # this generates fewer output files (only granularity graphs)
16 # but should be faster and far less memory consuming
17 # -h ... help; print this text.
18 # -v ... verbose mode.
20 #############################################################################
28 if ( $opt_v ) { do print_verbose_message(); }
30 # ---------------------------------------------------------------------------
32 # ---------------------------------------------------------------------------
34 foreach $s (@sparks) {
35 # extract END events for this spark-site
36 open (GET,"cat $input | tf -s $s | avg-RTS") || die "!$\n";
43 # -----------------------------------------------------------------------------
48 open(ME,$0) || die "Can't open myself ($0): $!\n";
60 $opt_s =~ s/[\(\)\[\]]//g;
61 @sparks = split(/[,;. ]+/, $opt_s);
63 @sparks = ( 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15);
67 print "Usage: $0 [options] <gr-file>\n;";
68 print "Use -h option to get details\n";
73 ($basename = $gr_file) =~ s/\.gr//;
74 $rts_file = $basename . ".rts"; # "RTS";
75 $gran_file = "g.ps"; # $basename . ".ps";
76 #$rts_file = $gr_file;
77 #$rts_file =~ s/\.gr/.rts/g;
81 $va_dvi_file = $va_file;
82 $va_dvi_file =~ s/\.tex/.dvi/g;
83 $va_ps_file = $va_file;
84 $va_ps_file =~ s/\.tex/.ps/g;
87 $va_dvi_file = "va.dvi";
88 $va_ps_file = "va.ps";
92 $template_file = $opt_t;
94 $template_file = "TEMPL";
100 # -----------------------------------------------------------------------------
102 sub print_verbose_message {
103 print "Sparks: (" . join(',',@sparks) . ")\n";
104 print "Files: .gr " . $gr_file . " template " . $template_file .
105 " va " . $va_file . "\n";
108 # -----------------------------------------------------------------------------