Příručka:BenchmarkParse.php
Appearance
| Verze MediaWiki: | ≥ 1.23 |
| Soubor MediaWiki: benchmarkParse.php | |
|---|---|
| Lokalita: | maintenance/benchmarks/ |
| Zdrojový kód: | master • 1.45.1 • 1.44. • 1.39.16 |
| Třídy: | BenchmarkParse |
Podrobnosti
benchmarkParse.php file is a maintenance script to benchmark how long it takes to parse a given title at an optionally specified timestamp.
Options/Arguments
| Option/Argument | Description | Required? |
|---|---|---|
| title | The name of the page to parse | Požadované |
| --warmup | Repeat the parse operation this number of times to warm the cache | Volitelné |
| --loops | Number of times to repeat parse operation post-warmup | Volitelné |
| --page-time | Use the version of the page which was current at the given time | Volitelné |
| --tpl-time | Use templates which were current at the given time (except that moves and deletes are not handled properly) | Volitelné |
| --reset-linkcache | Reset the LinkCache after every parse. | Volitelné |
Usage
php maintenance/run.php benchmarks/benchmarkParse title [ --warmup| --loops| --page-time| --tpl-time| --reset-linkcache ]
Terminal
$ php maintenance/run.php benchmarks/benchmarkParse "Main Page" CPU time = 0.003 s, wall clock time = 0.006 s
Ve verzi MediaWiki 1.39.16 a starší musíte vyvolat skripty údržby pomocí
php maintenance/NazevSkriptu.php namísto php maintenance/run.php NazevSkriptu.Obama test
Colloquial name for a quick test of the parsing speed on Wikimedia servers, which uses the infamous Barack Obama article (which used to take 30+ seconds for parsing).
php /usr/local/apache/common/multiversion/MWScript.php maintenance/benchmarks/benchmarkParse.php \
--wiki=enwiki --loops=10 --warmup=10 "Barack Obama"