From: Francois Gouget Subject: [PATCH 2/3] testbot/web: Show the number of blocked tasks on the activity page. Message-Id: Date: Wed, 21 Feb 2018 01:38:29 +0100 (CET) Signed-off-by: Francois Gouget --- testbot/lib/WineTestBot/Activity.pm | 5 +++-- testbot/web/Activity.pl | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/testbot/lib/WineTestBot/Activity.pm b/testbot/lib/WineTestBot/Activity.pm index 3016b14d6..acec6064c 100644 --- a/testbot/lib/WineTestBot/Activity.pm +++ b/testbot/lib/WineTestBot/Activity.pm @@ -68,6 +68,7 @@ for the specified timestamp. Entries have the following structure: end => , runnable => , queued => , + blocked => , engine => , statusvms => { => { @@ -145,7 +146,7 @@ sub GetActivity($;$) my $Group = $ActivityHash->{$Record->RecordGroupId}; if ($Record->Type eq "tasks" and $Record->Name eq "counters") { - ($Group->{runnable}, $Group->{queued}) = split / /, $Record->Value; + ($Group->{runnable}, $Group->{queued}, $Group->{blocked}) = split / /, $Record->Value; } elsif ($Record->Type eq "engine" and $Record->Name =~ /^(?:start|stop)$/) { @@ -237,7 +238,7 @@ sub GetActivity($;$) if ($LastGroup) { $LastGroup->{end} = $Group->{start}; - foreach my $Counter ('runnable', 'queued') + foreach my $Counter ('runnable', 'queued', 'blocked') { if (!exists $Group->{$Counter} and exists $LastGroup->{$Counter}) { diff --git a/testbot/web/Activity.pl b/testbot/web/Activity.pl index 13c77c68e..91153b3a3 100644 --- a/testbot/web/Activity.pl +++ b/testbot/web/Activity.pl @@ -161,9 +161,11 @@ EOF print "
\n"; next; } - if ($Group->{runnable} or $Group->{queued}) + if ($Group->{runnable} or $Group->{queued} or $Group->{blocked}) { - print "", ($Group->{runnable} || 0), " / ", ($Group->{queued} || 0), ""; + print "", ($Group->{runnable} || 0), " / ", + ($Group->{queued} || 0), + ($Group->{blocked} ? "+$Group->{blocked}" : ""), ""; } else { @@ -282,7 +284,7 @@ sub GenerateFooter($) print "running a task (in which case it links to it),
\n"; print "dirty while the server is powering off the VM after a task or while it assesses its state on startup.

\n"; - print "

If no time is indicated then the VM remained in that state for less than 2 seconds. The tasks column indicates the number of runnable / queued tasks before that scheduling round. A long horizontal bar indicates the TestBot server was restarted.

\n"; + print "

If no time is indicated then the VM remained in that state for less than 2 seconds. The tasks column indicates the number of runnable / queued tasks before that scheduling round. If any task needs to run on a maintenance, retired or deleted VM is is shown as +N. A long horizontal bar indicates the TestBot server was restarted.

\n"; print "

This border indicates that the task timed out,
\n"; print "this border denotes a transient (network?) error so the task will be re-run,
\n"; print "and this border indicates a TestBot error.
\n"; -- 2.16.1