From: Ian Jackson Subject: [OSSTEST PATCH] ms-flights-summary: Improve the overview table Date: Tue, 17 Nov 2015 11:55:56 +0000 Message-ID: <1447761356-546-1-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.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zyery-000894-4a for xen-devel@lists.xenproject.org; Tue, 17 Nov 2015 11:56:18 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org - Align the queued/preparing/running/etc. totals into table columns. - Use to highlight `queued' jobs. - Use to highlight the end time if it is the flight end, not just a phase end. - No longer print the `total unqueued' separately. - Show the `common info'. Replace much of the HTML generation with plain literal or almost-literal HTML, since the HTML is complex to generate but easy to write. An example of the output can be seen here: http://xenbits.xen.org/people/iwj/2015/flights-summary.html Signed-off-by: Ian Jackson --- ms-flights-summary | 52 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/ms-flights-summary b/ms-flights-summary index fb03a26..ec8fa18 100755 --- a/ms-flights-summary +++ b/ms-flights-summary @@ -355,12 +355,36 @@ printf("

%d flight(s) consisting of %s job(s)
%s
%s anonymous/rogue join(" + ", map { "$global_stats{$_} $_" } (sort_stats(\%global_stats))), scalar keys %anon_jobs); -printf("\n"); -printf("\n"); -printf(" \n") foreach ("Flight", "Branch", "Blessing", - "(Active+Complete)/Total Jobs", "Counts", - "End of current phase"); -printf("\n"); +my %summarycounts; +foreach my $fi (values %flights) { + $summarycounts{$_} += $fi->{Stats}{$_} foreach (keys \%{ $fi->{Stats} }); +} +my @summarycounts = sort_stats \%summarycounts; + +printf < + + + + + + + + + + + + + +END + +print(" \n") foreach @summarycounts; + +print < + + +END my $alt = 0; foreach my $f (sort keys %flights) { @@ -372,11 +396,17 @@ foreach my $f (sort keys %flights) { print " \n"; print " \n"; print " \n"; - print " \n"; - print " \n"; - print " \n"; + print " \n"; + foreach (@summarycounts) { + my $s = ($fi->{Stats}{$_} || ''); + $s = "$s" if $s && $_ eq 'queued'; + print " "; + } + my $expectedend = fmttime($fi->{ExpectedEnd}); + $expectedend = "$expectedend" + if $fi->{UnqueuedJobs} == $fi->{NrJobs}; + print " \n"; + print " \n"; print "\n"; $alt ^= 1; } -- 1.7.10.4
$_
FlightBranchBlessingJob countsEnd of phase/flightCommon info
Total$_(active jobs only)
$f$fi->{Branch}$fi->{Intended}$fi->{UnqueuedJobs}/$fi->{NrJobs}". - join(" + ", map { "$fi->{Stats}{$_} $_" } (sort_stats(\%{$fi->{Stats}}))) - ."".fmttime($fi->{ExpectedEnd})."$fi->{NrJobs}$s$expectedend".($fi->{Info} || '')."