From f65d9ec046e945c52f15f68207d1a60c1beca301 Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Tue, 19 Apr 2011 12:01:45 +0000 Subject: filter out dubious buildtimes (fuzzy) --- index.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index e24dd4e..3a05998 100644 --- a/index.php +++ b/index.php @@ -175,8 +175,14 @@ foreach ($matches as $val) { $pkgs[$key]['buildtime']['start'] = key2timestamp($val[6]); $pkgs[$key]['buildtime']['end'] = round($val[12]); $pkgs[$key]['buildtime']['diff'] = $pkgs[$key]['buildtime']['end'] - $pkgs[$key]['buildtime']['start']; - $buildtime_total += $pkgs[$key]['buildtime']['diff']; - $build_count += 1; + + // keep obviously dubious values out of there + // 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; + } } } // sort by key in reverse order to have more recent pkgs first -- cgit v1.2.1