]>
Commit | Line | Data |
---|---|---|
ed9b544e | 1 | require 'benchmark' |
2 | $:.push File.join(File.dirname(__FILE__), 'lib') | |
3 | require 'redis' | |
4 | ||
5 | times = 20000 | |
6 | ||
7 | @r = Redis.new | |
8 | @r['foo'] = "The first line we sent to the server is some text" | |
9 | Benchmark.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}"]} } | |
11 | end | |
12 | ||
13 | @r.keys('*').each do |k| | |
14 | @r.delete k | |
15 | end |