From f1b2fbc3eab56a244f27023916495909bfba675a Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Tue, 21 Feb 2012 14:57:30 +0000 Subject: Group build times < 1 minute together in the stats --- index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index a9163b2..40010d0 100644 --- a/index.php +++ b/index.php @@ -423,7 +423,8 @@ if ($total > 0) { if ($p['type'] == 'uploaded') { $tdiff = timediff($p['buildtime']['start'], $p['buildtime']['end']); // use $p['buildtime']['diff']; instead? $s .= $tdiff; - @$buildtime_stats[$tdiff] += 1; + $tdiff = floor(($p['buildtime']['end'] - $p['buildtime']['start']) / 60)*60; + @$buildtime_stats[timediff(0, $tdiff)] += 1; } $s .= ''; $s .= ''; @@ -486,7 +487,7 @@ if ($total > 0) { $max = max($buildtime_stats); foreach ($buildtime_stats as $time => $count) { $bts .= sprintf('%s', - $time, + $time == "0 second" ? "< 1 minute" : $time, round($count/$max*100), $count); -- cgit v1.2.1