Skip to content

Commit 7e5ed90

Browse files
committed
Remove bench with write concern 0 as tests needs to be run on standalone server
1 parent e72b632 commit 7e5ed90

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

benchmark/DriverBench/SingleDocBench.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use MongoDB\Benchmark\BaseBench;
77
use MongoDB\BSON\Document;
88
use MongoDB\Driver\Command;
9-
use MongoDB\Driver\WriteConcern;
109
use PhpBench\Attributes\BeforeMethods;
1110
use PhpBench\Attributes\ParamProviders;
1211
use PhpBench\Attributes\Revs;
@@ -28,9 +27,10 @@ public function prepareDatabase(): void
2827
public function benchRunCommand(): void
2928
{
3029
$manager = self::createClient()->getManager();
30+
$database = self::getDatabase();
3131

3232
for ($i = 0; $i < 10_000; $i++) {
33-
$manager->executeCommand(self::getDatabase(), new Command(['hello' => true]));
33+
$manager->executeCommand($database, new Command(['hello' => true]));
3434
}
3535
}
3636

@@ -96,12 +96,6 @@ public static function provideInsertOneParams(): Generator
9696
'repeat' => 10_000,
9797
];
9898

99-
yield 'Small doc WC 0' => [
100-
'document' => self::readJsonFile(self::SMALL_FILE_PATH),
101-
'repeat' => 10_000,
102-
'options' => ['writeConcern' => new WriteConcern(0)],
103-
];
104-
10599
yield 'Large doc' => [
106100
'document' => self::readJsonFile(self::LARGE_FILE_PATH),
107101
'repeat' => 10,
@@ -111,11 +105,5 @@ public static function provideInsertOneParams(): Generator
111105
'document' => Document::fromJSON(file_get_contents(self::LARGE_FILE_PATH)),
112106
'repeat' => 10,
113107
];
114-
115-
yield 'Large doc WC 0' => [
116-
'document' => Document::fromJSON(file_get_contents(self::LARGE_FILE_PATH)),
117-
'repeat' => 10,
118-
'options' => ['writeConcern' => new WriteConcern(0)],
119-
];
120108
}
121109
}

0 commit comments

Comments
 (0)