Skip to content

Commit c677b09

Browse files
committed
Refactoring to latest phpbench
1 parent 4c14420 commit c677b09

File tree

7 files changed

+14
-22
lines changed

7 files changed

+14
-22
lines changed

benchmarks/BaseBench.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
namespace PHPCR\Benchmark;
44

55
use PHPCR\NodeInterface;
6-
use PhpBench\Benchmark;
6+
use PhpBench\BenchmarkInterface;
77
use PHPCR\ImportUUIDBehaviorInterface;
88

9-
abstract class BaseBench implements Benchmark
9+
abstract class BaseBench implements BenchmarkInterface
1010
{
1111
const ROOT_NAME = 'bench';
1212
const ROOT_PATH = '/bench';

benchmarks/InsertBench.php

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

99
/**
1010
* @group insert
11-
* @processIsolation iteration
1211
*/
1312
class InsertBench extends BaseBench
1413
{
1514
/**
16-
* @description Insert nodes
1715
* @paramProvider provideNbNodes
1816
* @beforeMethod beforeResetWorkspace
1917
* @iterations 2

benchmarks/QueryBench.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
/**
99
* @group query
10-
* @processIsolation iteration
1110
*/
1211
class QueryBench extends BaseBench
1312
{
@@ -17,7 +16,6 @@ public function setUp()
1716
}
1817

1918
/**
20-
* @description No iterations
2119
* @paramProvider provideQueries
2220
* @iterations 5
2321
* @group query_single_prop
@@ -29,7 +27,6 @@ public function benchQuery(Iteration $iteration)
2927
}
3028

3129
/**
32-
* @description Retrive nodes for each row
3330
* @paramProvider provideQueries
3431
* @iterations 5
3532
* @group query_single_prop
@@ -45,7 +42,6 @@ public function benchQueryWithNodes(Iteration $iteration)
4542
}
4643

4744
/**
48-
* @description Iterate over rows and retrieve properties
4945
* @paramProvider provideQueries
5046
* @iterations 5
5147
* @group query_single_prop
@@ -61,7 +57,6 @@ public function benchQueryIterate(Iteration $iteration)
6157
}
6258

6359
/**
64-
* @description Run a select query with variable amount of properties
6560
* @paramProvider provideProperties
6661
* @iterations 5
6762
* @group query_variable_props

benchmarks/TraversalBench.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
use PHPCR\NodeInterface;
66

7-
/**
8-
* @processIsolation iteration
9-
*/
107
class TraversalBench extends BaseBench
118
{
129
public function setUp()
@@ -15,7 +12,6 @@ public function setUp()
1512
}
1613

1714
/**
18-
* @description Full traversal
1915
* @group traversal_full
2016
* @iterations 3
2117
*/
@@ -25,7 +21,6 @@ public function benchFullTraversal()
2521
}
2622

2723
/**
28-
* @description Full traversal and read all properties
2924
* @group traversal_full
3025
* @iterations 3
3126
*/

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
],
1111
"minimum-stability": "dev",
1212
"require": {
13-
"phpbench/phpbench": "~0.3.0"
13+
"phpbench/phpbench": "dev-master"
1414
},
1515
"autoload": {
1616
"psr-4": {

config/phpbench renamed to config/bootstrap.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,3 @@
2222
}
2323

2424
require_once($cwd . '/tests/bootstrap.php');
25-
26-
$config = new PhpBench\Configuration();
27-
$config->setPath(__DIR__ . '/../benchmarks');
28-
29-
require_once('report.php');
30-
31-
return $config;

config/phpbench.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"bootstrap": "./bootstrap.php",
3+
"path": "../benchmarks",
4+
"reports": "{
5+
"insert": {
6+
"extends": "aggregate",
7+
"title": "Inserting Nodes",
8+
"description": "Insert nodes into the repository as children of a single parent"
9+
}
10+
}
11+
}

0 commit comments

Comments
 (0)