Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/Activity.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/testbot/lib/WineTestBot/Activity.pm b/testbot/lib/WineTestBot/Activity.pm index 53aff0582..f7579057e 100644 --- a/testbot/lib/WineTestBot/Activity.pm +++ b/testbot/lib/WineTestBot/Activity.pm @@ -415,9 +415,11 @@ sub GetStatistics($;$) if ($JobCount) { @JobTimes = sort { $a <=> $b } @JobTimes; - $GlobalStats->{"jobs.time.p10"} = $JobTimes[int($JobCount * 0.1)]; - $GlobalStats->{"jobs.time.p50"} = $JobTimes[int($JobCount * 0.5)]; - $GlobalStats->{"jobs.time.p90"} = $JobTimes[int($JobCount * 0.9)]; + for (my $P = 10; $P < 100; $P += 10) + { + my $Name = sprintf("jobs.time.p%02d", $P); + $GlobalStats->{$Name} = $JobTimes[int($JobCount * $P / 100)]; + } @JobTimes = (); # free early }