benchmarker: Implement setupEach for per-iteration setup
[lhc/web/wiklou.git] / maintenance / benchmarks / benchmarkTitleValue.php
index c60f4bb..6bd7953 100644 (file)
@@ -83,14 +83,22 @@ class BenchmarkTitleValue extends Benchmarker {
                        [
                                'function' => [ $this, 'getPrefixedTextTitle' ],
                        ],
-                       [
+                       'parseTitleValue cached' => [
                                'function' => [ $this, 'parseTitleValue' ],
                                'setup' => [ $this, 'randomize' ],
                        ],
-                       [
+                       'parseTitle cached' => [
                                'function' => [ $this, 'parseTitle' ],
                                'setup' => [ $this, 'randomize' ],
                        ],
+                       'parseTitleValue no cache' => [
+                               'function' => [ $this, 'parseTitleValue' ],
+                               'setupEach' => [ $this, 'randomize' ],
+                       ],
+                       'parseTitle no cache' => [
+                               'function' => [ $this, 'parseTitle' ],
+                               'setupEach' => [ $this, 'randomize' ],
+                       ],
                ] );
        }