xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [OSSTEST PATCH 3/5] ms-flights-summary: Invent a `prep.alloc.' pseudo job state
Date: Mon, 18 Jul 2016 15:04:04 +0100	[thread overview]
Message-ID: <1468850646-2283-3-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1468850646-2283-1-git-send-email-ian.jackson@eu.citrix.com>

This allows us to separate out `preparing' jobs into ones which are in
our data plan and ones which are not.  The ones which are not may not
have quite started to run ts-hosts-allocate, or may still be in the
planning queue and not made it into the projection.

In either case we don't have an estimated finish time for them.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ms-flights-summary | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/ms-flights-summary b/ms-flights-summary
index 98cca90..9a814ea 100755
--- a/ms-flights-summary
+++ b/ms-flights-summary
@@ -124,6 +124,9 @@ sub gather_stats($) {
 END
     for my $row (@{$stats}) {
 	my ($job,$stat) = @$row;
+        if ($stat eq 'preparing') {
+            $stat = %{ $f->{Jobs}{$job}{Reso} } ? 'prep.alloc.' : 'preparing';
+        }
 	$f->{Stats}{lc($stat)}++;
 	$global_stats{lc($stat)}++;
     }
@@ -137,11 +140,12 @@ sub sort_stats($) {
     my %so = (
 	queued => 1,
 	preparing => 2,
-	blocked => 3,
-	running => 4,
-	pass => 5,
-	fail => 6,
-	broken => 7,
+	'prep.alloc.' => 3,
+	blocked => 4,
+	running => 5,
+	pass => 6,
+	fail => 7,
+	broken => 8,
     );
     return sort { ($so{$a}//0) <=> ($so{$b}//0) } (keys %{$stats});
 }
-- 
2.1.4


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

  parent reply	other threads:[~2016-07-18 14:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18 14:04 [OSSTEST PATCH 1/5] ms-flights-summary: Do gather_stats on jobs a bit later Ian Jackson
2016-07-18 14:04 ` [OSSTEST PATCH 2/5] ms-flights-summary: Do gather_stats without GROUP BY Ian Jackson
2016-07-18 14:04 ` Ian Jackson [this message]
2016-07-18 14:04 ` [OSSTEST PATCH 4/5] ms-flights-summary: Treat preparing jobs outside the plan as `queued' Ian Jackson
2016-07-18 14:04 ` [OSSTEST PATCH 5/5] sg-execute-flight: Fix an error message Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468850646-2283-3-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).