Francois Gouget : testbot/web: Show the number of blocked tasks on the activity page.

Alexandre Julliard julliard at winehq.org
Wed Feb 21 13:09:23 CST 2018


Module: tools
Branch: master
Commit: ab5406028e06f1c51341e88a89c5c2a6af0dfb3b
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=ab5406028e06f1c51341e88a89c5c2a6af0dfb3b

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Feb 21 01:38:29 2018 +0100

testbot/web: Show the number of blocked tasks on the activity page.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 3016b14..acec606 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      => <EndTimestamp>,
       runnable => <RunnableTasksCount>,
       queued   => <QueuedTasksCount>,
+      blocked  => <TasksOnMaintenanceOrDisabledVMsCount>,
       engine   => <StartOrStop>,
       statusvms => {
         <VMName1> => {
@@ -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 13c77c6..91153b3 100644
--- a/testbot/web/Activity.pl
+++ b/testbot/web/Activity.pl
@@ -161,9 +161,11 @@ EOF
       print "<td colspan='", scalar(@SortedVMs), "'><hr></td>\n";
       next;
     }
-    if ($Group->{runnable} or $Group->{queued})
+    if ($Group->{runnable} or $Group->{queued} or $Group->{blocked})
     {
-      print "<td class='Record'>", ($Group->{runnable} || 0), " / ", ($Group->{queued} || 0), "</td>";
+      print "<td class='Record'>", ($Group->{runnable} || 0), " / ",
+            ($Group->{queued} || 0),
+            ($Group->{blocked} ? "+$Group->{blocked}" : ""), "</td>";
     }
     else
     {
@@ -282,7 +284,7 @@ sub GenerateFooter($)
   print "<span class='Record-running'>running</span> a task (in which case it links to it),<br>\n";
   print "<span class='Record-dirty'>dirty</span> while the server is powering off the VM after a task or while it assesses its state on startup.</p>\n";
 
-  print "<p>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. </p>\n";
+  print "<p>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. </p>\n";
   print "<p>This <span class='Record Record-running Record-timeout'>border</span> indicates that the task timed out,<br>\n";
   print "this <span class='Record Record-running Record-error'>border</span> denotes a transient (network?) error so the task will be re-run,<br>\n";
   print "and this <span class='Record Record-running Record-boterror'>border</span> indicates a TestBot error.<br>\n";




More information about the wine-cvs mailing list