]>
git.saurik.com Git - redis.git/blob - client-libraries/perl/scripts/redis-benchmark.pl
5 use Benchmark qw
/:all/;
14 '00_ping' => sub { $r->ping },
15 '10_set' => sub { $r->set( 'foo', $i++ ) },
16 '11_set_r' => sub { $r->set( 'bench-' . rand(), rand() ) },
17 '20_get' => sub { $r->get( 'foo' ) },
18 '21_get_r' => sub { $r->get( 'bench-' . rand() ) },
19 '30_incr' => sub { $r->incr( 'counter' ) },
20 '30_incr_r' => sub { $r->incr( 'bench-' . rand() ) },
21 '40_lpush' => sub { $r->lpush( 'mylist', 'bar' ) },
22 '40_lpush' => sub { $r->lpush( 'mylist', 'bar' ) },
23 '50_lpop' => sub { $r->lpop( 'mylist' ) },