aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/benchmarks/benchmarkPurge.php
Commit message (Collapse)AuthorAgeFilesLines
* Replace a number of uses of class aliases with the real thingsJames D. Forrester2025-03-261-2/+3
| | | | | | | Found via disabling phan's alias support for a run (and ignoring wgLang's hard-coded state of being a \Language, alas). Change-Id: I4753bcd84d72d6de111fc7ffc5841fa417bf7333
* Exclude boilerplate maintenance code from code coverage reportsDreamy Jazz2024-08-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Why: * Maintenance scripts in core have bolierplate code that is added before and after the class to allow directly running the maintenance script. * Running the maintenance script directly has been deprecated since 1.40, so this boilerplate code is only to support a now deprecated method of running maintenance scripts. * This code cannot also be marked as covered, due to PHPUnit not recognising code coverage for files. * Therefore, it is best to ignore this boilerplate code in code coverage reports as it cannot be marked as covered and also is for deprecated code. What: * Wrap the boilerplate code (requiring Maintenance.php and then later defining the maintenance script class and running if the maintenance script was called directly) with @codeCoverageIgnore comments. * Some files use a different boilerplate code, however, these should also be marked as ignored for coverage for the same reason that coverage is not properly reported for files. Bug: T371167 Change-Id: I32f5c6362dfb354149a48ce9c28da9a7fc494f7c
* Namespace remaining files under includes/deferredJames D. Forrester2023-11-221-0/+2
| | | | | Bug: T166010 Change-Id: Ibd40734b96fd2900e3ce12239d09becfb4150059
* benchmarks: Exclude from PHPUnit test coverageTimo Tijhof2019-12-181-1/+1
| | | | | | | | 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
* Rename CDN config variables to be generic, deprecating the old namesJames D. Forrester2019-05-241-10/+11
| | | | | | | | | Hook, methods, classes still to rename where appropriate. Bug: T104148 Depends-On: Id34339dff88bc6d1863378ac94b96b2d590b891d Depends-On: I4e2938395bcbf7956b83fff00978f09c61dcfa36 Change-Id: I7a725dae551c867a4fa7c213838d52c7fb862756
* Remove deprecated class SquidUpdateUmherirrender2019-02-051-1/+1
| | | | Change-Id: Iac53864296990befe7c573a29dd2f35aca52a79e
* Use ::class to resolve class names in maintenance scriptsUmherirrender2018-01-231-1/+1
| | | | | | | This helps to find renamed or misspelled classes earlier. Phan will check the class names Change-Id: I1d4567f47f93eb1436cb98558388e48d35258666
* Maintenance: add fatalError() methodBryan Davis2017-11-211-1/+1
| | | | | | | | Deprecate the second argument to Maintenance::error() in favor of a new Maintenance::fatalError() method. This is intended to make it easier to review flow control in maintenance scripts. Change-Id: I75699008638f7e99b11210c7bb9e2e131fca7c9e
* Convert all array() syntax to []Kunal Mehta2016-02-171-3/+3
| | | | | | | | | | Per wikitech-l consensus: https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html Notes: * Disabled CallTimePassByReference due to false positives (T127163) Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
* Use addDescription() instead of accessing mDescription directlyMax Semenik2016-01-301-1/+1
| | | | Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103
* Rename SquidUpdate => CdnCacheUpdateAaron Schulz2015-12-091-1/+1
| | | | | | Squid is not the only possible CDN Change-Id: Ie2a2955847c5706e630322bbbab71c9d063b378f
* Update formatting in maintenance/ (2/4)Siebrand Mazeland2014-04-231-0/+4
| | | | Change-Id: I2b791d3bff0de464b6bdaaeae0622c065389c31c
* Pass phpcs-strict on maintenance/benchmarks/Siebrand Mazeland2014-04-221-1/+0
| | | | Change-Id: I73558930909b35bbc13d0a0ac9368485cb2aa8c4
* Fixed some @params documentation (maintenance)umherirrender2014-04-171-3/+3
| | | | | | | | | Swapped some "$var type" to "type $var" or added missing types before the $var. Changed some other types to match the more common spelling. Makes beginning of some text in captial. Also added some missing @param. Change-Id: I727deec35a712de0f0c676cc87dfa661f1ee965b
* phpcs: More require/include is not a functionTimo Tijhof2013-05-211-1/+1
| | | | | | | | | | | | | Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81. Also updated usage in text in documentation and the installer LocalSettingsGenerator. Most of them were handled by this regex: - find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$ - replace: $1 $2; Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
* phpcs: Fix WhiteSpace.LanguageConstructSpacing warningsTimo Tijhof2013-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Squiz.WhiteSpace.LanguageConstructSpacing: Language constructs must be followed by a single space; expected "require_once expression" but found "require_once(expression)" It is a keyword (e.g. like `new`, `return` and `print`). As such the parentheses don't make sense. Per our code conventions, we use a space after keywords like these. We appeared to have an unwritten exception for `require` that doesn't make sense. About 60% of require/include usage was missing the space and/or had superfluous parentheses. It is as silly as print("foo") or return("foo"), it works because keywords have no significance for whitespace between it and the expression that follows, and since experessions can be wrapped in parentheses for clarity (e.g. when doing string concatenation or mathematical operations) the parenthesis before and after basiclaly just ignored. Change-Id: I2df2f80b8123714bea7e0771bf94b51ad5bb4b87
* Remove usage of wfTime() in benchmarks and backupTextPassTest.phpAlexandre Emsenhuber2012-09-061-2/+2
| | | | | | | | | | Left the usage in GlobalTest.php since these are tests for that function. This function is only a wrapper to microtime( true ), so it can easily be replaced and deprecated at some point. Change-Id: I4f7c1f6705e10e2664f8e9be51d86ed5c8ff1e1c
* Added missing GPLv2 headers in maintenance scripts.Alexandre Emsenhuber2012-09-041-1/+6
| | | | | | | - made file/class documentation more consistent - contains a fix for Id7a04ff8 (2a7478b) Change-Id: I5264105ce1b6ad86a9840e05be1af99f5d6e252a
* Use __DIR__ instead of dirname( __FILE__ )jeroendedauw2012-08-271-1/+1
| | | | | | We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :) Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
* Fix doc for maintenance/benchmarksAntoine Musso2012-02-081-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110940
* Remove some unused getting of non existent argumentsSam Reed2011-10-181-0/+4
| | | | | | | Documentation Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/100130
* Fix concern raised by Brion in r74108 (but has really existed since the ↵Chad Horohoe2011-01-131-1/+1
| | | | | | | | | | | maintenance rewrite). Right now, including a maintenance script causes it to execute. This is bad when you want to reuse the particular class but not have it start executing all by itself. Until now, we relied on setting MW_NO_SETUP which was a) hacky, b) irreversable, and c) likely to be forgotten if you didn't use one of the wrappers like runChild(). Instead, move the freaky magic to doMaintenance and have *it* check if it's in a specific call stack that indicates this is being run from the file scope and should be executed. Rename DO_MAINTENANCE to RUN_MAINTENANCE_IF_MAIN so it's nice and clear what magic happens behind the require_once(). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/80205
* Make BenchmarkPurge subclass benchmark, not really reusing most of the code ↵Sam Reed2010-12-311-3/+2
| | | | | | | yet... Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/79331
* Move benchmarkPurge to maintenance/benchmarks folderSam Reed2010-12-311-0/+107
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/79329