Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- r = Redis.new
- Benchmark.bmbm do |b|
- b.report("With pipelined") do
- r.pipelined { 100000.times{|i| r.set("test#{i}", i)} }
- end
- b.report("With pipelined inside") do
- 100000.times{|i| r.pipelined {r.set( "test#{i}", i)} }
- end
- b.report("No pipeline") do
- 100000.times{|i| r.set("test#{i}", i)}
- end
- end
Add Comment
Please, Sign In to add comment