1.23
2.0
main
test-branch
| Line | |
|---|
| 1 | #!/usr/bin/perl
|
|---|
| 2 |
|
|---|
| 3 | my $civlDir="."; # directory to civl
|
|---|
| 4 | my $numArgs = scalar(@ARGV);
|
|---|
| 5 | my $out = "scale.pdf";
|
|---|
| 6 | my $benchOut = "bench.scale.out";
|
|---|
| 7 |
|
|---|
| 8 | for(my $i=0; $i < $numArgs; $i++){
|
|---|
| 9 | my $arg = $ARGV[$i];
|
|---|
| 10 |
|
|---|
| 11 | if($arg =~ /^\-d(.*)$/){
|
|---|
| 12 | $civlDir=$1;
|
|---|
| 13 | }elsif ($arg =~ /^\-o(.*)$/){
|
|---|
| 14 | $out = $1;
|
|---|
| 15 | if(!($out =~ /\.pdf$/)){
|
|---|
| 16 | warn "$out is not a pdf file name, $out.pdf will be used for output file instead.\n";
|
|---|
| 17 | $out="$out.pdf";
|
|---|
| 18 | }
|
|---|
| 19 | }else{
|
|---|
| 20 | warn "Arguments should start with -d or -o, invalid argument $arg would be ignored.\n";
|
|---|
| 21 | }
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | my $scriptPrefix="$civlDir/scripts/scale";
|
|---|
| 25 |
|
|---|
| 26 | print "running scale benchmarks...\n";
|
|---|
| 27 | my $cmd = `$scriptPrefix/runBenchScale.pl $civlDir -o$benchOut`;
|
|---|
| 28 | print "scale benchmarks finished, now generating .dat file...\n";
|
|---|
| 29 | $cmd = `$scriptPrefix/parseScale.pl $benchOut`;
|
|---|
| 30 | print ".dat file finished, now generating figure...\n";
|
|---|
| 31 | $cmd = `gnuplot $scriptPrefix/plotScale`;
|
|---|
| 32 | print "scaling figure is successfully generated in $out\n";
|
|---|
| 33 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.