summaryrefslogtreecommitdiffstats
path: root/test_index.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-09-05 15:07:32 +0000
committerRomain d'Alverny <rda@mageia.org>2012-09-05 15:07:32 +0000
commitce2b60721754a1b1f2c3a08cdf08c20312ba6253 (patch)
treea4e523c19289da80a6a2f74a7c67a7e3da14e2b7 /test_index.php
parent4f4061ca4e3cb4eed76b6ecfcb6d3a0a2d609bb7 (diff)
downloadpkgsubmit-ce2b60721754a1b1f2c3a08cdf08c20312ba6253.tar
pkgsubmit-ce2b60721754a1b1f2c3a08cdf08c20312ba6253.tar.gz
pkgsubmit-ce2b60721754a1b1f2c3a08cdf08c20312ba6253.tar.bz2
pkgsubmit-ce2b60721754a1b1f2c3a08cdf08c20312ba6253.tar.xz
pkgsubmit-ce2b60721754a1b1f2c3a08cdf08c20312ba6253.zip
move buildtime_* computations outside of publish_stats_headers()
Diffstat (limited to 'test_index.php')
-rw-r--r--test_index.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/test_index.php b/test_index.php
index bf07e25..2024548 100644
--- a/test_index.php
+++ b/test_index.php
@@ -55,9 +55,15 @@ list($pkgs, $hosts, $build_count, $build_dates, $buildtime_total) = get_refined_
list($stats, $users, $total, $pkgs) = build_stats($pkgs);
+$buildtime_total = $buildtime_total / 60;
+$buildtime_avg = ($build_count == 0) ?
+ 0 :
+ round($buildtime_total / $build_count, 2);
+
publish_stats_headers(
$stats,
$buildtime_total,
+ $buildtime_avg,
$build_count,
(isset($_GET['last']) && $total > 0) ? reset($pkgs) : null
);