Manual:benchmarkParse.php
Appearance
| MediaWiki バージョン: | ≧ 1.23 |
| MediaWiki ファイル: benchmarkParse.php | |
|---|---|
| 場所: | maintenance/benchmarks/ |
| ソース コード: | master • 1.45.1 • 1.44.3 • 1.39.17 |
| クラス: | BenchmarkParse |
詳細
benchmarkParse.php ファイルは、指定されたページ名の構文解析 (タイムスタンプも指定可能) に要する時間のベンチマークを行う保守スクリプトです。
オプション/引数
| オプション/引数 | 説明 | 必須かどうか |
|---|---|---|
| title | 解析するページの名前 | 必須 |
| --warmup | Repeat the parse operation this number of times to warm the cache | 省略可能 |
| --loops | Number of times to repeat parse operation post-warmup | 省略可能 |
| --page-time | Use the version of the page which was current at the given time | 省略可能 |
| --tpl-time | Use templates which were current at the given time (except that moves and deletes are not handled properly) | 省略可能 |
| --reset-linkcache | Reset the LinkCache after every parse. | 省略可能 |
使用法
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
MediaWiki バージョン 1.39.17 以前では、メンテナンス スクリプトを
php maintenance/run.php スクリプト名 ではなく php maintenance/スクリプト名.php を使用して実行する必要があります。
オバマ テスト
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"