mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
15 lines
374 B
Ruby
15 lines
374 B
Ruby
require 'benchmark'
|
|
$:.push File.join(File.dirname(__FILE__), 'lib')
|
|
require 'redis'
|
|
|
|
times = 20000
|
|
|
|
@r = Redis.new
|
|
@r['foo'] = "The first line we sent to the server is some text"
|
|
Benchmark.bmbm do |x|
|
|
x.report("set") { 20000.times {|i| @r["foo#{i}"] = "The first line we sent to the server is some text"; @r["foo#{i}"]} }
|
|
end
|
|
|
|
@r.keys('*').each do |k|
|
|
@r.delete k
|
|
end |