Francois Gouget : testbot: Keep track of the completed jobs and tasks.
Alexandre Julliard
julliard at winehq.org
Mon Feb 12 12:52:27 CST 2018
Module: tools
Branch: master
Commit: c4b0e7ba117abd4ae8a5fafb19c203cb183f1063
URL: https://source.winehq.org/git/tools.git/?a=commit;h=c4b0e7ba117abd4ae8a5fafb19c203cb183f1063
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Feb 12 01:33:59 2018 +0100
testbot: Keep track of the completed jobs and tasks.
Over short periods the rate at which jobs and tasks are created does not
necessarily match the one at which they are completed. We are already
tracking the creation rates so we should track the completion rates too
so they can be compared.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/lib/WineTestBot/Activity.pm | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/testbot/lib/WineTestBot/Activity.pm b/testbot/lib/WineTestBot/Activity.pm
index 4aed4ed..c76b21e 100644
--- a/testbot/lib/WineTestBot/Activity.pm
+++ b/testbot/lib/WineTestBot/Activity.pm
@@ -368,7 +368,9 @@ sub GetStatistics($;$)
foreach my $Task (@{$Tasks->GetItems()})
{
$GlobalStats->{"newtasks.count"}++ if ($CountsAsNew);
+
next if (!$Task->Ended or $Task->Ended < $Cutoff);
+ $GlobalStats->{"donetasks.count"}++;
# $Task->Started should really be set since $Task->Ended is
if ($Task->Started and $Task->Status !~ /^(?:queued|running|canceled)$/)
@@ -393,12 +395,15 @@ sub GetStatistics($;$)
}
}
- if (!$IsSpecialJob and $Job->Ended and $Job->Ended >= $Cutoff and
- $Job->Status !~ /^(?:queued|running|canceled)$/)
+ if ($Job->Ended and $Job->Ended >= $Cutoff)
{
- my $Time = $Job->Ended - $Job->Submitted;
- _AddFullStat($GlobalStats, "jobs.time", $Time, undef, $Job);
- push @JobTimes, $Time;
+ $GlobalStats->{"donejobs.count"}++;
+ if (!$IsSpecialJob and $Job->Status !~ /^(?:queued|running|canceled)$/)
+ {
+ my $Time = $Job->Ended - $Job->Submitted;
+ _AddFullStat($GlobalStats, "jobs.time", $Time, undef, $Job);
+ push @JobTimes, $Time;
+ }
}
}
More information about the wine-cvs
mailing list