From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [OSSTEST PATCH 13/13] Reporting: sg-report-flight: Put overall pushgate stats in email Date: Tue, 30 Jun 2015 10:33:48 +0100 Message-ID: <1435656828.21469.43.camel@citrix.com> References: <1435598089-21647-1-git-send-email-ian.jackson@eu.citrix.com> <1435598089-21647-14-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z9rvN-0004W0-QN for xen-devel@lists.xenproject.org; Tue, 30 Jun 2015 09:33:53 +0000 In-Reply-To: <1435598089-21647-14-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Mon, 2015-06-29 at 18:14 +0100, Ian Jackson wrote: > This adds something like this (would have appeared in 37638): > > Last test of basis 37629 2015-06-24 21:36:10 Z 4 days > Testing same since 37635 2015-06-28 03:05:56 Z 1 days 4 attempts > Failing since 37630 2015-06-26 10:35:44 Z 3 days 9 attempts Chronologically shouldn't the second and third lines be the other way around? > > or this (would have appeared in 37629): > > Last test of basis 37617 2015-06-20 04:06:01 Z 9 days > Testing same since 37628 2015-06-24 13:35:23 Z 5 days 2 attempts > > (Both examples from the Cambridge instance.) > > This is added just after the versions are reported. > > Signed-off-by: Ian Jackson > --- > sg-report-flight | 41 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 41 insertions(+) > > diff --git a/sg-report-flight b/sg-report-flight > index c1661ec..5ca004a 100755 > --- a/sg-report-flight > +++ b/sg-report-flight > @@ -499,6 +499,45 @@ sub printversions ($) { > } > } > > +sub print_pushgate_summary () { > + my @thistree = sort keys %{ $specver{'this'} }; > + my @thattree = sort keys %{ $specver{'that'} }; > + if (!(@thistree==1 && @thattree==1 && $thistree[0] eq $thattree[0])) { > + print DEBUG "NO PUSHGATE SUMMARY (@thistree) != (@thattree)"; > + } > + my $tree = $thistree[0]; > + > + my $info = report_find_push_age_info( > + [ $blessings[0] ], $maxflight, [ $branch ], > + $tree, $specver{that}{$tree}, $specver{this}{$tree} > + ); > + print "\n"; > + my $now = time; > + my $pinfo = sub { > + my ($what, $flightkey, $countkey) = @_; > + my $f = $info->{$flightkey}; > + my $count = $info->{$countkey}; > + printf "%-20s", $what; > + if ($f) { > + printf(" %6d %s %4d days", > + $f->{flight}, > + show_abs_time($f->{started}), > + floor(($now - $f->{started}) / 86400)); > + } else { > + printf(" %34s ","(not found)"); > + } > + if (defined $count) { > + printf(" %4d attempts", $count); > + } > + print "\n"; > + }; > + $pinfo->('Last test of basis', "Basis",''); > + $pinfo->('Testing same since', "FirstTip","CountTip"); > + $pinfo->('Failing since', "FirstAfterBasis","CountAfterBasis") > + unless ($info->{FirstAfterBasis}{flight} // 'NONE') > + eq ($info->{FirstTip}{flight} // 'NONE'); > +} > + > sub printout { > my ($r, @failures) = @_; > print < @@ -579,6 +618,8 @@ END > printversions('that'); > } > > + print_pushgate_summary(); > + > if (@includefiles) { > print "\n","-"x60, "\n" or die $!; > }