Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (15 sloc) 298 Bytes
$redis.flushall
puts "[redis] set"
puts Benchmark.measure {
1.upto ITERATIONS do |i|
$redis.set "an-average-key-#{i}", "an-average-value-#{i}"
end
}
keys = []
1.upto ITERATIONS do |i|
keys << "an-average-key-#{i}"
end
puts "[redis] mget"
puts Benchmark.measure {
$redis.mget keys
}