Module: tools Branch: master Commit: 892646b54fc9a747bedd992a9b816610fb01bfd1 URL: https://source.winehq.org/git/tools.git/?a=commit;h=892646b54fc9a747bedd992a...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Apr 14 16:57:20 2022 +0200
testbot/web: Show all the job.time percentiles.
And add a bar graph to give a better sense of how the job durations stack up.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/web/Stats.pl | 13 +++++++++---- testbot/web/WineTestBot.css | 2 ++ 2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/testbot/web/Stats.pl b/testbot/web/Stats.pl index 7ef65b3..3c0fe99 100644 --- a/testbot/web/Stats.pl +++ b/testbot/web/Stats.pl @@ -223,10 +223,15 @@ sub GenerateBody($) _GenGlobalLine($GlobalStats, "busy.elapsed", "Busy %", "The percentage of wall clock time where the TestBot was busy running jobs.");
print "<tr><td class='StatSeparator'>Job times</td><td colspan='2'><hr></td></tr>\n"; - _GenGlobalLine($GlobalStats, "jobs.time.p10", "10%", "10% of the jobs completed within this time."); - _GenGlobalLine($GlobalStats, "jobs.time.p50", "50%", "50% of the jobs completed within this time."); - _GenGlobalLine($GlobalStats, "jobs.time.p90", "90%", "90% of the jobs completed within this time."); - _GenGlobalLine($GlobalStats, "jobs.time.max", "Max", "The slowest job took this long. Note that this is heavily influenced by test storms."); + my $Max = $GlobalStats->{"jobs.time.max"}; + for (my $Percentile = 10; $Percentile < 100; $Percentile += 10) + { + my $Bar = 100 * $GlobalStats->{"jobs.time.p$Percentile"} / $Max; + my $Space = 100 - $Bar; + _GenGlobalLine($GlobalStats, "jobs.time.p$Percentile", "$Percentile%", + "<div class='PercentBar' style='width: ${Bar}px;'> </div><div class='PercentSpace' style='width: ${Space}px;'></div> $Percentile% of the jobs completed within this time."); + } + _GenGlobalLine($GlobalStats, "jobs.time.max", "Max", "<div class='PercentBar' style='width: 100px;'> </div> Duration of the slowest job. Note that this is heavily influenced by test storms.");
print "<tr><td class='StatSeparator'>Average times</td><td colspan='2'><hr></td></tr>\n"; _GenGlobalLine($GlobalStats, "jobs.time", "Job completion", "How long it takes to complete a regular job (excluding canceled ones). Note that this is heavily influenced by test storms."); diff --git a/testbot/web/WineTestBot.css b/testbot/web/WineTestBot.css index 301ba71..53c939e 100644 --- a/testbot/web/WineTestBot.css +++ b/testbot/web/WineTestBot.css @@ -445,3 +445,5 @@ td.Record { text-align: center; } .Record.Record-miss { border-top: thick dashed #ff6600; }
td.StatSeparator { color: #601919; font-weight: bold; } +.PercentBar { background-color: #601919; display: inline-block; } +.PercentSpace { display: inline-block; }