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 --- The stats page's small barchart only has 10 values and I may be comparing apples and oranges but at first glance I think the shape on my box matches what queuing theory would predict for a fairly loaded system (the more loaded the more curvy). It probably makes sense too. And I suspect the result will be pretty similar on the TestBot. --- 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 7ef65b3bf..3c0fe9990 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 301ba71df..53c939efd 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; }