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 | my $hasCivlDir=0;
|
|---|
| 8 |
|
|---|
| 9 | for(my $i=0; $i < $numArgs; $i++){
|
|---|
| 10 | my $arg = $ARGV[$i];
|
|---|
| 11 |
|
|---|
| 12 | if($arg =~ /^\-d(.*)$/){
|
|---|
| 13 | $civlDir=$1;
|
|---|
| 14 | $hasCivlDir=1;
|
|---|
| 15 | }elsif ($arg =~ /^\-o(.*)$/){
|
|---|
| 16 | $out = $1;
|
|---|
| 17 | if(!($out =~ /\.pdf$/)){
|
|---|
| 18 | warn "$out is not a pdf file name, $out.pdf will be used for output file instead.\n";
|
|---|
| 19 | $out="$out.pdf";
|
|---|
| 20 | }
|
|---|
| 21 | }else{
|
|---|
| 22 | warn "Arguments should start with -d or -o, invalid argument $arg would be ignored.\n";
|
|---|
| 23 | }
|
|---|
| 24 | }
|
|---|
| 25 |
|
|---|
| 26 | if($hasCivlDir == 0){
|
|---|
| 27 | warn "no civl directory is provided, current directory will be used as the civl directory.\n";
|
|---|
| 28 | }
|
|---|
| 29 |
|
|---|
| 30 | my $scriptPrefix="$civlDir/scripts/scale";
|
|---|
| 31 |
|
|---|
| 32 | print "running scale benchmarks...\n";
|
|---|
| 33 | my $cmd = `$scriptPrefix/runBenchScale.pl $civlDir -o$benchOut`;
|
|---|
| 34 | print "scale benchmarks finished, now generating .dat file...\n";
|
|---|
| 35 | $cmd = `$scriptPrefix/parseScale.pl $benchOut`;
|
|---|
| 36 | print ".dat file finished, now generating figure...\n";
|
|---|
| 37 | $cmd = `gnuplot $scriptPrefix/plotScale`;
|
|---|
| 38 | print "scaling figure is successfully generated in $out\n";
|
|---|
| 39 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.