Module: tools Branch: master Commit: b1fd79ec9994e1ae70a1319275e9355a3e483900 URL: https://source.winehq.org/git/tools.git/?a=commit;h=b1fd79ec9994e1ae70a13192...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Apr 14 16:57:15 2022 +0200
testbot: Collect some more job.time percentile values.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 53aff05..f757905 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 }