mirror of
https://github.com/fluencelabs/redis
synced 2025-06-21 04:51:32 +00:00
first commit
This commit is contained in:
15
client-libraries/ruby/bench.rb
Normal file
15
client-libraries/ruby/bench.rb
Normal file
@ -0,0 +1,15 @@
|
||||
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
|
Reference in New Issue
Block a user