/[Redis.pre-github]/scripts/redis-benchmark.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /scripts/redis-benchmark.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 52 - (show annotations)
Mon Mar 23 14:45:32 2009 UTC (15 years ago) by dpavlin
File MIME type: text/plain
File size: 426 byte(s)
benchmark bindings and redis server

1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5 use Benchmark qw/:all/;
6 use lib 'lib';
7 use Redis;
8
9 my $r = Redis->new;
10
11 timethese( 100000, {
12 'ping' => sub { $r->ping },
13 'set' => sub { $r->set( 'bench-' . rand(), rand() ) },
14 'get' => sub { $r->get( 'bench-' . rand() ) },
15 'incr' => sub { $r->incr( 'bench-incr' ) },
16 'lpush' => sub { $r->lpush( 'bench-lpush', rand() ) },
17 'lpop' => sub { $r->lpop( 'bench-lpop' ) },
18 });

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26