[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 7/7] sg-report-flight: Report earlier, earlier step failures



The order of results reported by sg-report-flight determines which
testid the bisector will try to work on first.  It also determines the
order in which failures are shown in the email reports.  We currently
sort them by the duration estimate (for each failure's containing job).

We should prefer earlier steps.  So change the first sort key to be
the duration estimate only for the steps leading up to the step of
interest for each failure.  (By passing the testid to the duration
estimator.)

Since the granularity is in seconds, this may still not distinguish
when there are fast steps.  So as a secondary sort criterion, use the
stepno.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>

squash! sg-report-flight: Report earlier, earlier step failures
---
 sg-report-flight | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/sg-report-flight b/sg-report-flight
index d1acb60..ca9ba18 100755
--- a/sg-report-flight
+++ b/sg-report-flight
@@ -761,15 +761,29 @@ sub justifyfailures ($;$) {
 END
     $anypassq= db_prepare($anypassq);
 
-    my $duration_estimator= duration_estimator($branch, $blessings[0]);
+    my $duration_estimator=
+       duration_estimator($branch, $blessings[0], undef, 1);
     foreach my $failv (@failures) {
-        my ($est) = $duration_estimator->($failv->{Job}{job},'',undef);
+        my ($est) = $duration_estimator->($failv->{Job}{job},'',undef,
+                                        $failv->{Step}{testid});
         if (!defined $est) { $est = 1e5; }
         print DEBUG "DE $failv->{Job}{job} $est\n";
         $failv->{DurationEstimate}= $est;
     }
 
-    @failures= sort { $a->{DurationEstimate} <=> $b->{DurationEstimate} }
+    @failures= sort {
+       $a->{DurationEstimate} <=> $b->{DurationEstimate}
+       or $a->{Step}{stepno} <=> $b->{Step}{stepno}
+       # stepno is sequential only within each job, so strictly
+       # speaking this is not really a valid comparison: we will
+       # usually be comparing failed steps in different jobs.  But
+       # this comparison is a backstup, secondary to the duration
+       # estimate; and it does mean that if the two failures are
+       # different steps of the same job, and they ran fast so that
+       # they finished in the same second, we pick the lower-numbered
+       # step, which is the earlier one (if they are sequential at
+       # all).
+    }
         @failures;
 
     my @heisenflights;
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.