X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fbenchmarks%2Fbench_utf8_title_check.php;h=c92a7208680683c2c95cc8e8e5a620bc988dfa31;hb=19cd639835938da66507a1cc3623073c3217b416;hp=62bb0fa114395c55d22f91424c2103b9a7634dd0;hpb=036fbcc72c20633eaa786f9035576805b337ee72;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/benchmarks/bench_utf8_title_check.php b/maintenance/benchmarks/bench_utf8_title_check.php index 62bb0fa114..c92a720868 100644 --- a/maintenance/benchmarks/bench_utf8_title_check.php +++ b/maintenance/benchmarks/bench_utf8_title_check.php @@ -24,14 +24,12 @@ require_once __DIR__ . '/Benchmarker.php'; /** - * This little benchmark executes the regexp used in Language->checkTitleEncoding() - * and compares its execution time against that of mb_check_encoding, if available. + * This little benchmark executes the regexp formerly used in Language->checkTitleEncoding() + * and compares its execution time against that of mb_check_encoding. * * @ingroup Benchmark */ class BenchUtf8TitleCheck extends Benchmarker { - private $canRun; - private $data; public function __construct() { @@ -61,20 +59,11 @@ class BenchUtf8TitleCheck extends Benchmarker { ]; // @codingStandardsIgnoreEnd - $this->canRun = function_exists( 'mb_check_encoding' ); - - if ( $this->canRun ) { - $this->addDescription( "Benchmark for using a regexp vs. mb_check_encoding " . - "to check for UTF-8 encoding." ); - } else { - $this->addDescription( 'CANNOT RUN benchmark using mb_check_encoding: function not available.' ); - } + $this->addDescription( "Benchmark for using a regexp vs. mb_check_encoding " . + "to check for UTF-8 encoding." ); } public function execute() { - if ( !$this->canRun ) { - return; - } $benchmarks = []; foreach ( $this->data as $val ) { $benchmarks[] = [