]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
ms-flights-summary: Treat preparing jobs outside the plan as `queued'
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 15 Jul 2016 18:59:22 +0000 (18:59 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Fri, 15 Jul 2016 19:06:14 +0000 (19:06 +0000)
These jobs are still to run but we have no time estimate for them.

So do not add them to UnqueuedJobs; they then contribute to making the
`End of phase/flight' indication *not* bold when there are such jobs.

And bolden their figure in the table.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
ms-flights-summary

index 9a814ea4071f5b0c1bd25ed0e8cdc543ea4a9975..e4ce03b1717dba6e083760f539834d944dcf07a8 100755 (executable)
@@ -132,7 +132,9 @@ END
     }
 
     $f->{NrJobs} = keys %{$f->{Jobs}};
-    $f->{UnqueuedJobs} = $f->{NrJobs} - ($f->{Stats}{queued}//0);
+    $f->{UnqueuedJobs} = $f->{NrJobs}
+        - ($f->{Stats}{queued}//0)
+        - ($f->{Stats}{preparing}//0);
 }
 
 sub sort_stats($) {
@@ -407,7 +409,8 @@ foreach my $f (sort keys %flights) {
     print "  <td align=right><strong>$fi->{NrJobs}</strong></td>\n";
     foreach (@summarycounts) {
        my $s = ($fi->{Stats}{$_} || '');
-       $s = "<strong>$s</strong>" if $s && $_ eq 'queued';
+       $s = "<strong>$s</strong>"
+            if $s && ($_ eq 'queued' || $_ eq 'preparing');
        print "  <td align=right>$s</td>";
     }
     my $expectedend = fmttime($fi->{ExpectedEnd});