]> git.saurik.com Git - redis.git/blame - client-libraries/ruby/bench.rb
add expire command to the python lib
[redis.git] / client-libraries / ruby / bench.rb
CommitLineData
ed9b544e 1require 'benchmark'
2$:.push File.join(File.dirname(__FILE__), 'lib')
3require 'redis'
4
5times = 20000
6
7@r = Redis.new
8@r['foo'] = "The first line we sent to the server is some text"
9Benchmark.bmbm do |x|
10 x.report("set") { 20000.times {|i| @r["foo#{i}"] = "The first line we sent to the server is some text"; @r["foo#{i}"]} }
11end
12
13@r.keys('*').each do |k|
14 @r.delete k
15end