Module: tools
Branch: master
Commit: cb517f81bb7ac31c101b9bfdf38ecba7ccadc7b7
URL: https://source.winehq.org/git/tools.git/?a=commit;h=cb517f81bb7ac31c101b9bf…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon Feb 12 01:34:29 2018 +0100
testbot: Add a Munin plugin to monitor the TestBot activity.
This will make it possible to compare current data to historic data for
crucial parameters like the number of jobs and tasks per hour, the job
completion time, each VM host's busy rate, etc.
It will also make it possible to see if the reverts are progressively
getting slower, or if on the contrary they got slower on a specific
date, which would point to some change on the host, etc.
Note that access to the new Munin web page requires an API key to limit
who can query these statistics.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/Config.pm | 4 +-
testbot/lib/WineTestBot/ConfigLocalTemplate.pl | 4 +
testbot/scripts/MuninPlugin | 146 ++++++++
testbot/web/Munin.pl | 496 +++++++++++++++++++++++++
4 files changed, 648 insertions(+), 2 deletions(-)
Diff: https://source.winehq.org/git/tools.git/?a=commitdiff;h=cb517f81bb7ac31c101…
Module: tools
Branch: master
Commit: 6e8fd898fef19fde281f78353a31bef84886bc05
URL: https://source.winehq.org/git/tools.git/?a=commit;h=6e8fd898fef19fde281f783…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon Feb 12 01:34:25 2018 +0100
testbot: Explicitly track new tasks on a per VM host basis.
The number of tasks that got run on a VM host (running.time.count) is
not a proxy for the number of tasks that got created for that VM host
since not all tasks get run, for instance if the build fails.
Furthermore, when computing rates over short periods, the rate at which
tasks get completed on a given VM host is not the same as the rate at
which they get created, just as it is for jobs.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/Activity.pm | 14 ++++++++++++--
testbot/web/Stats.pl | 6 +++---
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/testbot/lib/WineTestBot/Activity.pm b/testbot/lib/WineTestBot/Activity.pm
index c76b21e..3016b14 100644
--- a/testbot/lib/WineTestBot/Activity.pm
+++ b/testbot/lib/WineTestBot/Activity.pm
@@ -367,10 +367,20 @@ sub GetStatistics($;$)
my $Tasks = $Step->Tasks;
foreach my $Task (@{$Tasks->GetItems()})
{
- $GlobalStats->{"newtasks.count"}++ if ($CountsAsNew);
-
+ my $HostStats;
+ if ($VMs->ItemExists($Task->VM->GetKey()))
+ {
+ my $Host = $Task->VM->GetHost();
+ $HostStats = ($HostsStats->{items}->{$Host} ||= {});
+ }
+ if ($CountsAsNew)
+ {
+ $GlobalStats->{"newtasks.count"}++;
+ $HostStats->{"newtasks.count"}++ if ($HostStats);
+ }
next if (!$Task->Ended or $Task->Ended < $Cutoff);
$GlobalStats->{"donetasks.count"}++;
+ $HostStats->{"donetasks.count"}++ if ($HostStats);
# $Task->Started should really be set since $Task->Ended is
if ($Task->Started and $Task->Status !~ /^(?:queued|running|canceled)$/)
diff --git a/testbot/web/Stats.pl b/testbot/web/Stats.pl
index 51a7227..806a366 100644
--- a/testbot/web/Stats.pl
+++ b/testbot/web/Stats.pl
@@ -264,15 +264,15 @@ sub GenerateBody($)
print "<th>$DisplayHost</th>\n";
_AddRate($HostsStats->{items}->{$Host}, "reverting.time.count", $HostsStats);
- _AddRate($HostsStats->{items}->{$Host}, "running.time.count", $HostsStats);
+ _AddRate($HostsStats->{items}->{$Host}, "newtasks.count", $HostsStats);
}
print "</tr></thead>\n";
print "<tbody>\n";
_GenStatsLine($HostsStats, "reverting.time.count", "Revert count", $SortedHosts);
_GenStatsLine($HostsStats, "reverting.rate", "Revert rate", $SortedHosts);
- _GenStatsLine($HostsStats, "running.time.count", "Task count", $SortedHosts);
- _GenStatsLine($HostsStats, "running.rate", "Task rate", $SortedHosts);
+ _GenStatsLine($HostsStats, "newtasks.count", "Task count", $SortedHosts);
+ _GenStatsLine($HostsStats, "newtasks.rate", "Task rate", $SortedHosts);
_GenStatsLine($HostsStats, "busy.elapsed", "Busy time", $SortedHosts, $NO_PERCENTAGE);
_GenStatsLine($HostsStats, "busy.elapsed", "Busy \%", $SortedHosts);
Module: tools
Branch: master
Commit: c4b0e7ba117abd4ae8a5fafb19c203cb183f1063
URL: https://source.winehq.org/git/tools.git/?a=commit;h=c4b0e7ba117abd4ae8a5faf…
Author: Francois Gouget <fgouget(a)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(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)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;
+ }
}
}