diff --git a/webtools/tinderbox/showbuilds.cgi b/webtools/tinderbox/showbuilds.cgi index b0f7dabf3142..3752c1eef929 100755 --- a/webtools/tinderbox/showbuilds.cgi +++ b/webtools/tinderbox/showbuilds.cgi @@ -27,16 +27,14 @@ $|=1; # -# show 36 hours by default +# show 12 hours by default # if($form{'showall'} != 0 ){ $mindate = 0; } else { - $hours = 36; - if( $form{hours} ne "" ){ - $hours = $form{hours}; - } + $hours = 12; + $hours = $form{hours} if $form{hours} ne ""; $mindate = time - ($hours*60*60); } @@ -71,23 +69,8 @@ if( $form{'tree'} eq '' ){ exit; } else { - if( $form{'timeit'} ) { - use Benchmark; - print "Timing the new express:
\n"; - $t0 = new Benchmark; - &do_express_fast; - $t1 = new Benchmark; - print "express_fast took: ", timestr(timediff($t1,$t0)), "
\n"; - print "Now time the old express:
\n"; - &do_express_old; - $t2 = new Benchmark; - print "express took: ", timestr(timediff($t2,$t1)), "
\n"; - exit; - } if( $form{'express'} ) { - &do_express_old; - } elsif( $form{'express_fast'} ) { - &do_express_fast; + &do_express; } else { &load_data; @@ -682,64 +665,7 @@ $script_str .= "\n"; } - -sub do_express_old { - my($mailtime, $buildtime, $buildname, $errorparser, $buildstatus, - $logfile); - my $buildrec; - my %build; - my %times; - - open(BUILDLOG, "<$form{'tree'}/build.dat" ) || die ; - while( ){ - chop; - ($mailtime, $buildtime, $buildname, $errorparser, $buildstatus, $logfile) = - split( /\|/ ); - if( $buildstatus eq 'success' || $buildstatus eq 'busted'){ - $build{$buildname} = $buildstatus; - $times{$buildname} = $buildtime; - } - } - close( BUILDLOG ); - - @keys = sort keys %build; - $keycount = @keys; - $treename = $form{tree}; - $tm = &print_time(time); - print "" - ."\n"; - my $maxtime = 0; - for $buildname (@keys) { - if ($maxtime < $times{$buildname}) { - $maxtime = $times{$buildname}; - } - } - - for $buildname (@keys ){ - if ($times{$buildname} < $maxtime - 12*60*60) { - # This build is more than 12 hours old. Ignore it. - next; - } - if( $build{$buildname} eq 'success' ){ - print ""; - } - print "
$tree as of $tm
"; - } - else { - if ($form{'nocrap'}) { - print ""; - } else { - print ""; - print "\n"; - } - } - print "$buildname
\n"; -} - -sub do_express_fast { +sub do_express { my($mailtime, $buildtime, $buildname, $errorparser, $buildstatus, $logfile); my $buildrec;