summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/index.php b/index.php
index d70c514..2d88a3f 100644
--- a/index.php
+++ b/index.php
@@ -132,8 +132,7 @@ $r = preg_match_all($re,
$pkgs = array();
-$buildtime_total = 0;
-$build_count = 0;
+$buildtime_total = array();
foreach ($matches as $val) {
@@ -180,14 +179,16 @@ foreach ($matches as $val) {
// 12 hours is be an acceptable threshold given current BS global perfs
// as of April 2011
if ($pkgs[$key]['buildtime']['diff'] < 43200) {
- $buildtime_total += $pkgs[$key]['buildtime']['diff'];
- $build_count += 1;
+ $buildtime_total[$key] = $pkgs[$key]['buildtime']['diff'];
}
}
}
// sort by key in reverse order to have more recent pkgs first
krsort($pkgs);
+$build_count = count($buildtime_total);
+$buildtime_total = array_sum($buildtime_total);
+
// count all packages statuses
$stats = array(
'uploaded' => 0,