Manual:BenchmarkParse.php
Appearance
Outdated translations are marked like this.
| Versão do MediaWiki: | ≥ 1.23 |
| Arquivo do MediaWiki: benchmarkParse.php | |
|---|---|
| Localização: | maintenance/benchmarks/ |
| Código-fonte: | master • 1.45.1 • 1.44. • 1.39.16 |
| Classes: | BenchmarkParse |
Detalhes
O arquivo benchmarkParse.php é um script de manutenção que referencia quanto tempo dura a análise de um determinado título em uma data e hora opcionalmente especificada.
Options/Arguments
| Option/Argument | Description | Required? |
|---|---|---|
| title | The name of the page to parse | Required |
| --warmup | Repeat the parse operation this number of times to warm the cache | Optional |
| --loops | Number of times to repeat parse operation post-warmup | Optional |
| --page-time | Use the version of the page which was current at the given time | Optional |
| --tpl-time | Use templates which were current at the given time (except that moves and deletes are not handled properly) | Optional |
| --reset-linkcache | Reset the LinkCache after every parse. | Optional |
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
No MediaWiki versão 1.39.16 e anteriores, você deve invocar os scripts de manutenção usando
php maintenance/scriptName.php em vez de php maintenance/run.php scriptName.
Teste Obama
Nome coloquial para um teste rápido da velocidade de análise nos servidores da Wikimedia, o qual utiliza o infame artigo Barack Obama (que costumava levar mais de 30 segundos para análise).
php /usr/local/apache/common/multiversion/MWScript.php maintenance/benchmarks/benchmarkParse.php \
--wiki=enwiki --loops=10 --warmup=10 "Barack Obama"