Skip to content

Instantly share code, notes, and snippets.

@jzawodn
Created July 25, 2010 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jzawodn/489905 to your computer and use it in GitHub Desktop.
Save jzawodn/489905 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl -w
$|++;
use strict;
use lib 'perl-Redis/lib';
use Redis;
my $r = Redis->new(server => 'localhost:63790') or die "$!";
## 2.5B values
for my $key (1..25_000_000) {
my @vals;
for my $k (1..50) {
my $v = int(rand($key));
push @vals, $k, $v;
}
$r->hmset("$key", @vals) or die "$!";
}
exit;
__END__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment