benchmarks: Exclude from PHPUnit test coverage
Also move Benchmarker.php to maintenance/includes/ because that file is not itself a benchmark, and that base class is actually covered by tests and should remain included. Change-Id: I4acd88242dde56a884d319dfc141a3511a8221a3
This commit is contained in:
parent
e29666c249
commit
8373f51cb0
20 changed files with 38 additions and 18 deletions
|
|
@ -204,7 +204,7 @@ $wgAutoloadLocalClasses = [
|
|||
'BenchmarkStringReplacement' => __DIR__ . '/maintenance/benchmarks/benchmarkStringReplacement.php',
|
||||
'BenchmarkTidy' => __DIR__ . '/maintenance/benchmarks/benchmarkTidy.php',
|
||||
'BenchmarkTitleValue' => __DIR__ . '/maintenance/benchmarks/benchmarkTitleValue.php',
|
||||
'Benchmarker' => __DIR__ . '/maintenance/benchmarks/Benchmarker.php',
|
||||
'Benchmarker' => __DIR__ . '/maintenance/includes/Benchmarker.php',
|
||||
'BitmapHandler' => __DIR__ . '/includes/media/BitmapHandler.php',
|
||||
'BitmapHandler_ClientOnly' => __DIR__ . '/includes/media/BitmapHandler_ClientOnly.php',
|
||||
'BitmapMetadataHandler' => __DIR__ . '/includes/media/BitmapMetadataHandler.php',
|
||||
|
|
|
|||
|
|
@ -11,5 +11,5 @@ For example:
|
|||
|
||||
## Fixtures
|
||||
|
||||
* australia-untidy.html.gz: Representative input text for benchmarkTidy.php.
|
||||
* tidy/australia-untidy.html.gz: Representative input text for benchmarkTidy.php.
|
||||
It needs to be decompressed before use.
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
use MediaWiki\MediaWikiServices;
|
||||
|
||||
require_once __DIR__ . '/Benchmarker.php';
|
||||
require_once __DIR__ . '/../includes/Benchmarker.php';
|
||||
|
||||
/**
|
||||
* Maintenance script that benchmarks HTTP request vs HTTPS request.
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
* @author Tyler Romeo
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/Benchmarker.php';
|
||||
require_once __DIR__ . '/../includes/Benchmarker.php';
|
||||
|
||||
/**
|
||||
* Maintenance script that benchmarks Wikimedia\base_convert().
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
* @ingroup Benchmark
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/Benchmarker.php';
|
||||
require_once __DIR__ . '/../includes/Benchmarker.php';
|
||||
|
||||
use Wikimedia\Rdbms\IDatabase;
|
||||
use Wikimedia\Rdbms\IMaintainableDatabase;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
* @author Platonides
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/Benchmarker.php';
|
||||
require_once __DIR__ . '/../includes/Benchmarker.php';
|
||||
|
||||
/**
|
||||
* Maintenance script that benchmark if elseif... versus switch case.
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
* @ingroup Benchmark
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/Benchmarker.php';
|
||||
require_once __DIR__ . '/../includes/Benchmarker.php';
|
||||
|
||||
/**
|
||||
* This little benchmark executes the regexp formerly used in Language->checkTitleEncoding()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
* @author Platonides
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/Benchmarker.php';
|
||||
require_once __DIR__ . '/../includes/Benchmarker.php';
|
||||
|
||||
/**
|
||||
* Maintenance script that benchmarks wfIsWindows().
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* @ingroup Benchmark
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/Benchmarker.php';
|
||||
require_once __DIR__ . '/../includes/Benchmarker.php';
|
||||
|
||||
/**
|
||||
* Maintenance script that benchmarks CSSMin.
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
* @ingroup Benchmark
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/Benchmarker.php';
|
||||
require_once __DIR__ . '/../includes/Benchmarker.php';
|
||||
|
||||
/**
|
||||
* Maintenance script that benchmarks %MediaWiki hooks.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* @ingroup Benchmark
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/Benchmarker.php';
|
||||
require_once __DIR__ . '/../includes/Benchmarker.php';
|
||||
|
||||
/**
|
||||
* Maintenance script that benchmarks JSMinPlus.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* @ingroup Benchmark
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/Benchmarker.php';
|
||||
require_once __DIR__ . '/../includes/Benchmarker.php';
|
||||
|
||||
/**
|
||||
* Maintenance script that benchmarks JavaScriptMinifier.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* @ingroup Benchmark
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/Benchmarker.php';
|
||||
require_once __DIR__ . '/../includes/Benchmarker.php';
|
||||
|
||||
/**
|
||||
* Maintenance script that benchmarks HashBagOStuff and MapCacheLRU.
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
* @ingroup Benchmark
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/Benchmarker.php';
|
||||
require_once __DIR__ . '/../includes/Benchmarker.php';
|
||||
|
||||
/**
|
||||
* Maintenance script that benchmarks CDN purge.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* @ingroup Benchmark
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/Benchmarker.php';
|
||||
require_once __DIR__ . '/../includes/Benchmarker.php';
|
||||
|
||||
/**
|
||||
* Maintenance script that benchmarks Sanitizer methods.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* @ingroup Benchmark
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/Benchmarker.php';
|
||||
require_once __DIR__ . '/../includes/Benchmarker.php';
|
||||
|
||||
/**
|
||||
* Maintenance script that benchmarks string replacement methods.
|
||||
|
|
|
|||
|
|
@ -1,8 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
*
|
||||
* @file
|
||||
* @ingroup Benchmark
|
||||
*/
|
||||
|
||||
use MediaWiki\MediaWikiServices;
|
||||
|
||||
require __DIR__ . '/Benchmarker.php';
|
||||
require __DIR__ . '/../includes/Benchmarker.php';
|
||||
|
||||
class BenchmarkTidy extends Benchmarker {
|
||||
public function __construct() {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
use MediaWiki\MediaWikiServices;
|
||||
|
||||
require_once __DIR__ . '/Benchmarker.php';
|
||||
require_once __DIR__ . '/../includes/Benchmarker.php';
|
||||
|
||||
/**
|
||||
* Maintenance script that benchmarks TitleValue vs Title.
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
<directory suffix=".php">skins</directory>
|
||||
<exclude>
|
||||
<directory suffix=".php">languages/messages</directory>
|
||||
<directory suffix=".php">maintenance/benchmarks</directory>
|
||||
<directory suffix=".php">extensions/*/tests</directory>
|
||||
<directory suffix=".php">skins/*/tests</directory>
|
||||
<file>languages/data/normalize-ar.php</file>
|
||||
|
|
|
|||
Loading…
Reference in a new issue