wiki.techinc.nl/maintenance/benchmarks
Ebrahim Byagowi fab78547ad Add namespace to the root classes of ObjectCache
And deprecated aliases for the the no namespaced classes.

ReplicatedBagOStuff that already is deprecated isn't moved.

Bug: T353458
Change-Id: Ie01962517e5b53e59b9721e9996d4f1ea95abb51
2024-07-10 00:14:54 +03:30
..
data
benchmarkCommentFormatter.php
benchmarkEval.php
benchmarkHooks.php
benchmarkJsonCodec.php Rename JsonUnserial… to JsonDeserial… 2024-06-12 14:50:58 -04:00
benchmarkJsValidate.php
benchmarkLruHash.php Add namespace to the root classes of ObjectCache 2024-07-10 00:14:54 +03:30
benchmarkParse.php Namespace includes/cache 2024-02-20 10:28:03 -05:00
benchmarkPurge.php
benchmarkSanitizer.php
benchmarkSettings.php
benchmarkTidy.php
benchmarkTitleValue.php
benchmarkTruncate.php
README.md

This directory hold several benchmarking scripts used track performances of MediaWiki and/or PHP.

Consistency

To gain greater precision than the time elapsed as reported by the benchmark itself, one can use the perf_events tool on Linux to count the number of CPU instructions, in addition to measuring how long it took to execute them.

This should accurately tell you how much machine code is executed. Note that this does not correctly model the cost of each instruction (especially memory access).

For example:

$ perf stat -e instructions php -d opcache.enable_cli=1 \
  maintenance/benchmarks/benchmarkEval.php --code="Html::openElement( 'a', [ 'class' => 'foo' ] )" \
  --inner=1000 --count=10000

eval:
   count: 10000
    rate:    590.1/s
   total: 16946.61ms
    mean:     1.69ms
      ...

Performance counter stats for 'php maintenance/benchmarks/..':
    83651088078  instructions
   17.225255198  seconds time elapsed
            ...

Fixtures