summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2012-02-21 14:57:30 +0000
committerPascal Terjan <pterjan@mageia.org>2012-02-21 14:57:30 +0000
commitf1b2fbc3eab56a244f27023916495909bfba675a (patch)
tree7a79d8eac1b71bc0ab8f2c16206480895522e669 /index.php
parentb0b35202e0db5e93055ce7cc178e1657634766d1 (diff)
downloadpkgsubmit-f1b2fbc3eab56a244f27023916495909bfba675a.tar
pkgsubmit-f1b2fbc3eab56a244f27023916495909bfba675a.tar.gz
pkgsubmit-f1b2fbc3eab56a244f27023916495909bfba675a.tar.bz2
pkgsubmit-f1b2fbc3eab56a244f27023916495909bfba675a.tar.xz
pkgsubmit-f1b2fbc3eab56a244f27023916495909bfba675a.zip
Group build times < 1 minute together in the stats
Diffstat (limited to 'index.php')
-rw-r--r--index.php5
1 files changed, 3 insertions, 2 deletions
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 .= '</td>';
$s .= '</tr>';
@@ -486,7 +487,7 @@ if ($total > 0) {
$max = max($buildtime_stats);
foreach ($buildtime_stats as $time => $count) {
$bts .= sprintf('<tr><td>%s</td><td><span style="width: %dpx; height: 10px; background: #aaa; display: block;" title="%d"></span></td></tr>',
- $time,
+ $time == "0 second" ? "< 1 minute" : $time,
round($count/$max*100),
$count);