[Compbench-devel] CompBenchmarks++ compbenchmarks-ui-perl,1.5,1.6
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2006-12-27 18:24:06
|
Update of /cvsroot/compbench/CompBenchmarks++ In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12527 Modified Files: compbenchmarks-ui-perl Log Message: Current context is now displayed while benchmarking. Build time are stored in results' file. Index: compbenchmarks-ui-perl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/compbenchmarks-ui-perl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** compbenchmarks-ui-perl 21 Dec 2006 18:37:11 -0000 1.5 --- compbenchmarks-ui-perl 27 Dec 2006 18:24:03 -0000 1.6 *************** *** 33,36 **** --- 33,37 ---- my $CBM_CURRENT_BENCH_STATUS_FILE = "$CBM_ROOT_DIRECTORY/$hostname/Status/bm-current-run"; my $CBM_CURRENT_BENCH_RESULTS_FILE = "$CBM_ROOT_DIRECTORY/$hostname/Status/bm-current-run-results.r"; + my $CBM_BENCHMARKS_RUNS_FILE = "$CBM_ROOT_DIRECTORY/$hostname/Configuration/Benchmarks-Runs"; my $CBM_BENCHMARKS_RUNS; *************** *** 528,531 **** --- 529,533 ---- exit(1); # !!! } + my $pwd = `pwd`; chomp($pwd); *************** *** 866,869 **** --- 868,873 ---- my $r_n; + my $p_end; + my $p_beg; foreach $r_c (@compilers_b) { *************** *** 872,899 **** for($r_n=0;$r_n<$CBM_BENCHMARKS_RUNS;$r_n++) { my $p = cbmc_package_get($r_b); if (defined($p)) { if ($p->{benchmarks}->{$r_b}->{Language} eq $r_l) { ! my $cmd = "$CBM --bench $r_b $r_c '$r_o' | $CBM_PROGRAMS{'GREP'} '^Benchmark result : ' | $CBM_PROGRAMS{'CUT'} -f2 -d':'"; if ((defined($resume_i)) && ($resume_i>$i)) { $i++; if ($i == $resume_i) { ! my $togo = ($TOTAL_TIME/$i)*($tot-$i); ! my $eta = cbmc_eta($togo); ! cbmc_dialog_gauge("Benchmarked : $i/$tot (ETA. $eta) - Previous context :\n\nCompiler : $r_c\nOptions : $r_o\nBenchmark : $r_b (" . ($r_n+1) . "/$CBM_BENCHMARKS_RUNS)", sprintf("%d", $i*100.0/$tot), 11, 70); } next; } ! my $beg = time(); $SIG{INT} = \&sigint_compbenchmark; - my $r = `$cmd`; $SIG{INT} = 'DEFAULT'; ! my $end = time(); ! $TOTAL_TIME+=($end-$beg); $i++; - my $togo = ($TOTAL_TIME/$i)*($tot-$i); - my $eta = cbmc_eta($togo); $r=~s/ //g; - cbmc_dialog_gauge("Benchmarked : $i/$tot (ETA. $eta) - Previous context :\n\nCompiler : $r_c\nOptions : $r_o\nBenchmark : $r_b (" . ($r_n+1) . "/$CBM_BENCHMARKS_RUNS)", sprintf("%d", $i*100.0/$tot), 11, 70); if ($r =~ /^([\d|\.]*)e\+(\d*)$/) { --- 876,938 ---- for($r_n=0;$r_n<$CBM_BENCHMARKS_RUNS;$r_n++) { my $p = cbmc_package_get($r_b); + my $togo; + my $eta; if (defined($p)) { if ($p->{benchmarks}->{$r_b}->{Language} eq $r_l) { ! my $cmd = "$CBM --bench $r_b $r_c '$r_o'"; if ((defined($resume_i)) && ($resume_i>$i)) { $i++; if ($i == $resume_i) { ! # $togo = ($TOTAL_TIME/$i)*($tot-$i); ! # $eta = cbmc_eta($togo); ! # my $si = $i+1; ! # cbmc_dialog_gauge("Benchmarked : $si/$tot (ETA. $eta) - Previous context :\n\nCompiler : $r_c\nOptions : $r_o\nBenchmark : $r_b (" . ($r_n+1) . "/$CBM_BENCHMARKS_RUNS)", sprintf("%d", $i*100.0/$tot), 11, 70); } next; } ! ! if (defined($TOTAL_TIME)) { ! $togo = ($TOTAL_TIME/$i)*($tot-$i); ! $eta = cbmc_eta($togo); ! my $si = $i+1; ! cbmc_dialog_gauge("Benchmarking : $si/$tot (ETA. $eta)\n\nCompiler : $r_c\nOptions : $r_o\nBenchmark : $r_b (" . ($r_n+1) . "/$CBM_BENCHMARKS_RUNS)", sprintf("%d", $i*100.0/$tot), 11, 70); ! } else { ! my $si = $i+1; ! cbmc_dialog_gauge("Benchmarking : $si/$tot (ETA. ?)\n\nCompiler : $r_c\nOptions : $r_o\nBenchmark : $r_b (" . ($r_n+1) . "/$CBM_BENCHMARKS_RUNS)", 0.0, 11, 70); ! $togo = "?"; ! $eta = ""; ! } ! ! ! $p_beg = time(); $SIG{INT} = \&sigint_compbenchmark; + my @r = `$cmd`; + my $r = 0; + my $bt = -1; + `../slowdown.sh`; + + $p_end = time(); $SIG{INT} = 'DEFAULT'; ! ! chomp(@r); ! foreach(@r) { ! if (/^Benchmark result : (.*)$/) { ! $r=$1; ! chomp($r); ! last; ! } ! } ! foreach(@r) { ! if (/^Build time : (.*)$/) { ! $bt=$1; ! chomp($bt); ! last; ! } ! } ! ! $TOTAL_TIME+=($p_end-$p_beg); $i++; $r=~s/ //g; if ($r =~ /^([\d|\.]*)e\+(\d*)$/) { *************** *** 910,913 **** --- 949,953 ---- my $F = $CBM_CURRENT_BENCH_RESULTS_FILE; + open(FD, ">>$F"); # file must exists for archiving if (($r ne '') && (($r =~ /^\d*$/) || ($r =~ /^\d*\.\d*$/)) && ($r>0)) { *************** *** 915,921 **** $r.="\n"; } ! print FD "result::benchmark=$r_b\nresult::compiler=$r_c\nresult::options=$r_o\nresult::value=$r\n"; } close(FD); $F = $CBM_CURRENT_BENCH_STATUS_FILE; open(FD, ">$F"); --- 955,967 ---- $r.="\n"; } ! print FD "result::benchmark=$r_b\nresult::compiler=$r_c\nresult::options=$r_o\nresult::value=$r"; ! if ($bt != -1) { ! print FD "result::build-time::value=$bt\n"; ! } ! print FD "\n"; } close(FD); + + $F = $CBM_CURRENT_BENCH_STATUS_FILE; open(FD, ">$F"); |