Skip to content

Commit 2ff0b19

Browse files
committed
bench(Redis): Don't use I/O commands (See Notes)
Notes: I think not doing commands doing I/O should prevent, or at the very least reduce, any variability that could be associated with disks R/W. What's more, we're not using AOF, so a bgRewriteAOF doesn't make sense. We fundamentally don't care about the commands executed, only the overhead associated with traceMethodNoArgs and traceMethodAsCommand
1 parent 478ec78 commit 2ff0b19

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/Benchmarks/Integrations/PHPRedisBench.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class PHPRedisBench
1818
* @Iterations(15)
1919
* @OutputTimeUnit("microseconds")
2020
* @RetryThreshold(10.0)
21+
* @Warmup(2)
2122
*/
2223
public function benchRedisBaseline()
2324
{
@@ -31,6 +32,7 @@ public function benchRedisBaseline()
3132
* @Iterations(15)
3233
* @OutputTimeUnit("microseconds")
3334
* @RetryThreshold(10.0)
35+
* @Warmup(2)
3436
*/
3537
public function benchRedisOverhead()
3638
{
@@ -44,11 +46,8 @@ public function redisScenario()
4446
['auth', 'user'],
4547
['ping', null],
4648
['echo', 'hey'],
47-
['save', null],
48-
['bgRewriteAOF', null],
49-
['bgSave', null],
50-
['flushAll', null],
51-
['flushDb', null],
49+
['rawCommand', 'PING'],
50+
['isConnected', null]
5251
];
5352

5453
foreach ($commands as $command) {

0 commit comments

Comments
 (0)