4 Alan Burlison asked for something to give a status report on running
smokes. So I put something together in smokestatus.pl, thank you
Alan for this good idea.
Just after starting a run:
larry$ perl smokestatus.pl -c 58x_config Use of uninitialized value in division (/) at smokestatus.pl line 182. Illegal division by zero at smokestatus.pl line 182.
Patch attached.
-- Alan Burlison --
*** smokestatus.pl.orig Sat Aug 9 22:00:09 2003
--- smokestatus.pl Sat Aug 9 22:07:54 2003
***************
*** 107,116 ****
printf "Change number $rpt->{patch} started on %s GMT.\n",
scalar gmtime( $rpt->{started} );
! print "$rpt->{count} out of $ccnt configurations finished in $rpt->{time}.\n";
printf "$rpt->{fail} configuration%s showed failures%s.\n",
! ($rpt->{fail} == 1 ? "" : "s"), $rpt->{stat} ? " ($rpt->{stat})" : "";
printf "$rpt->{running} failure%s in the running configuration.\n",
($rpt->{running} == 1 ? "" : "s")
--- 107,118 ----
printf "Change number $rpt->{patch} started on %s GMT.\n",
scalar gmtime( $rpt->{started} );
! print "$rpt->{count} out of $ccnt configurations finished",
! $rpt->{count} ? " in $rpt->{time}.\n" : ".\n";
printf "$rpt->{fail} configuration%s showed failures%s.\n",
! ($rpt->{fail} == 1 ? "" : "s"), $rpt->{stat} ? " ($rpt->{stat})" : ""
! if $rpt->{count};
printf "$rpt->{running} failure%s in the running configuration.\n",
($rpt->{running} == 1 ? "" : "s")
***************
*** 117,124 ****
if exists $rpt->{running};
my $todo = $ccnt - $rpt->{count};
! my $todo_time = time_in_hhmm( $todo * $rpt->{avg} );
! printf "$todo configuration(s) to finish, in est. $todo_time.\n",
$todo == 1 ? "" : "s"
if $todo;
--- 119,127 ----
if exists $rpt->{running};
my $todo = $ccnt - $rpt->{count};
! my $todo_time = $rpt->{avg} eq 'unknown' ? '.' :
! "estimated completion in " . time_in_hhmm( $todo * $rpt->{avg} );
! printf "$todo configuration(s) to finish$todo_time\n",
$todo == 1 ? "" : "s"
if $todo;
***************
*** 179,185 ****
$rpt{finished} ||= "Busy";
$rpt{count} = scalar keys %{ $rpt{config} };
! $rpt{avg} = $rpt{secs} / $rpt{count};
$rpt{time} = time_in_hhmm( $rpt{secs} );
$rpt{fail} = 0; $rpt{stat} = { };
foreach my $config ( keys %{ $rpt{config} } ) {
--- 182,188 ----
$rpt{finished} ||= "Busy";
$rpt{count} = scalar keys %{ $rpt{config} };
! $rpt{avg} = $rpt{count} ? $rpt{secs} / $rpt{count} : 'unknown';
$rpt{time} = time_in_hhmm( $rpt{secs} );
$rpt{fail} = 0; $rpt{stat} = { };
foreach my $config ( keys %{ $rpt{config} } ) {
