From bc6671bc2023a4f413dcb7846475aae9f2b9d1ed Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Tue, 19 Apr 2011 22:55:18 +0000 Subject: graph build time --- index.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index bea2e71..711ab4c 100644 --- a/index.php +++ b/index.php @@ -398,14 +398,17 @@ if ($total > 0) { uksort($buildtime_stats, "timesort"); $bts = ''; + $max = max($buildtime_stats); foreach ($buildtime_stats as $time => $count) { - $bts .= sprintf('%s%d', - $time, $count); + $bts .= sprintf('%s', + $time, + round($count/$max*100), + $count); $tmp = explode(' ', $time); } - $s .= ''; + $s .= '
Build time
'; $s .= sprintf(' @@ -418,11 +421,13 @@ if ($total > 0) { $s .= $bts; $s .= '
Build time
Total time%s hours
Average%s minutes
Does not take
build failures
into account.
'; - $s .= ''; + $s .= '
Build times
'; $max = max($build_dates); foreach ($build_dates as $time => $count) $s .= sprintf('', - $time, round($count / $max * 100), $count); + $time, + round($count / $max * 100), + $count); $s .= '
Build times
%d
'; $s .= ''; -- cgit v1.2.1