[git] web/qa.git branch master updated. 5529231

From: Date: Wed, 15 Feb 2012 12:02:09 +0000
Subject: [git] web/qa.git branch master updated. 5529231
Groups: php.qa 
Request: Send a blank email to php-qa+get-66103@lists.php.net to get a copy of this message
The branch, master on web/qa.git has been updated via 552923188d1a9e6682fda991de70f32b45c96ba9 (commit) via 6499a5ca230e2d2f0fc24e42768f9cd2f91b2b64 (commit) from 33285455ee8881b2d1aab3683123fd1073aa5475 (commit) http://git.php.net/?p=web/qa.git;a=log;h=552923188d1a9e6682fda991de70f32b45c96ba9;hp=33285455ee8881b2d1aab3683123fd1073aa5475 Summary of changes: reports/reportsfunctions.php | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) -- Log ---------------------------------------- commit 552923188d1a9e6682fda991de70f32b45c96ba9 Author: Johannes Schlüter <johannes@php.net> Date: Wed Feb 15 12:54:28 2012 +0100 Be more verbose on error. diff --git a/reports/reportsfunctions.php b/reports/reportsfunctions.php index a3a1231..5776f24 100644 --- a/reports/reportsfunctions.php +++ b/reports/reportsfunctions.php @@ -140,7 +140,7 @@ function get_summary_data($mode = QA_REPORT_FILTER_ALL) "SELECT COUNT(*) AS nbReports, MAX(date) AS lastReport FROM reports" ); if (!$query) - die("An error occured when reading a DB file."); + die("An error occured when reading summary data from $version DB file."); $row = $query->fetchArray(SQLITE3_ASSOC); $data[$version] = $row; @@ -148,7 +148,7 @@ function get_summary_data($mode = QA_REPORT_FILTER_ALL) "select count(distinct test_name) as nbFailingTests, count(*) as nbFailures from failed" ); if (!$query) - die("An error occured when reading a DB file."); + die("An error occured when reading failingTest data from $version DB file."); $row = $query->fetchArray(SQLITE3_ASSOC); $data[$version]['nbFailingTests'] = $row['nbFailingTests']; $data[$version]['nbFailures'] = $row['nbFailures']; commit 6499a5ca230e2d2f0fc24e42768f9cd2f91b2b64 Author: Johannes Schlüter <johannes@php.net> Date: Wed Feb 15 12:51:50 2012 +0100 Add filter for minimal version Currently used mostly as test to see what makes the site slow. diff --git a/reports/reportsfunctions.php b/reports/reportsfunctions.php index 0a50b42..a3a1231 100644 --- a/reports/reportsfunctions.php +++ b/reports/reportsfunctions.php @@ -80,6 +80,22 @@ class devFilterIterator extends WhitelistedFilterIterator } } +class minVersionFilterIterator extends FilterIterator +{ + private $min; + + public function __construct(Traversable $inner, $minversion) + { + parent::__construct($inner); + $this->min = $minversion; + } + + public function accept() + { + return version_compare($this->min, $this->key(), '<='); + } +} + const QA_REPORT_FILTER_NONE = 0; const QA_REPORT_FILTER_ALPHA = 1; const QA_REPORT_FILTER_BETA = 2; @@ -87,6 +103,7 @@ const QA_REPORT_FILTER_RC = 4; const QA_REPORT_FILTER_DEV = 8; const QA_REPORT_FILTER_ALL = 15; +const QA_REPORT_FILTER_CURRENT_RELEASES = 16; /** * Analyse sqlite files and retrieve data from it @@ -111,6 +128,10 @@ function get_summary_data($mode = QA_REPORT_FILTER_ALL) if ($mode & QA_REPORT_FILTER_DEV) { $it = new devFilterIterator($it, $QA_RELEASES['reported']); } + if ($mode & QA_REPORT_FILTER_CURRENT_RELEASES) { + $it = new minVersionFilterIterator($it, "5.3.10"); + } + foreach ($it as $version => $database_file) { $database = new SQLite3($database_file, SQLITE3_OPEN_READONLY); Thank you for your contribution.

« previous php.qa (#66103) next »