Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
chaz6chez committed Sep 15, 2023
1 parent 103886d commit a3fb40d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/simple-benchmark.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@

$count = 10000;

$interval = 0;
dump("count: $count", "interval: $interval μs");
$start = microtime(true);
for ($i = 0; $i < 10000; $i ++) {
$redis->set('test-redis', $i);
usleep($interval);
}
dump('redis: ' . microtime(true) - $start);
$redis->del('test-redis');

$start = microtime(true);
for ($i = 0; $i < $count; $i ++) {
\Workbunny\WebmanSharedCache\Cache::Set('test-cache', $i);
usleep($interval);
}
dump('cache: ' . microtime(true) - $start);
\Workbunny\WebmanSharedCache\Cache::Del('test-cache');
dump('-----------------------------------');

$interval = 1;
dump("count: $count", "interval: $interval μs");
$start = microtime(true);
Expand Down

0 comments on commit a3fb40d

Please sign in to comment.