Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit faa12a2

Browse files
committedDec 13, 2015
Updated to latest version of PHPBench
1 parent 691b3b5 commit faa12a2

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed
 

‎benchmarks/BaseBench.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
use PhpBench\BenchmarkInterface;
77
use PHPCR\ImportUUIDBehaviorInterface;
88

9+
/**
10+
* @Iterations(10)
11+
* @Revs(10)
12+
* @BeforeClassMethods({"beforeClass"})
13+
* @OutputTimeUnit("milliseconds")
14+
*/
915
abstract class BaseBench
1016
{
1117
const ROOT_NAME = 'bench';
@@ -88,7 +94,7 @@ protected function getRootNode()
8894
return $this->rootNode;
8995
}
9096

91-
protected function loadDump($filename, $remove = false)
97+
public function loadDump($filename, $remove = false)
9298
{
9399
$dumpPath = __DIR__ . '/../dumps/' . $filename;
94100

‎benchmarks/InsertBench.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
/**
1010
* @Groups({"insert"})
11-
* @Iterations(4)
12-
* @Revs(4)
1311
*/
1412
class InsertBench extends BaseBench
1513
{

‎benchmarks/QueryBench.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77

88
/**
99
* @Groups({"query"})
10-
* @Iterations(5)
1110
*/
1211
class QueryBench extends BaseBench
1312
{
14-
public function setUp()
13+
public static function beforeClass()
1514
{
16-
$this->loadDump('large_website.xml');
15+
(new self)->loadDump('large_website.xml');
1716
}
1817

1918
/**

‎benchmarks/TraversalBench.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
/**
88
* @Groups({"traversal_full"})
9-
* @Iterations(6)
109
*/
1110
class TraversalBench extends BaseBench
1211
{
1312
public function setUp()
1413
{
14+
1515
$this->loadDump('large_website.xml');
1616
}
1717

0 commit comments

Comments
 (0)
Please sign in to comment.