Guest User

Untitled

a guest
Sep 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. r = Redis.new
  2.  
  3. Benchmark.bmbm do |b|
  4. b.report("With pipelined") do
  5. r.pipelined { 100000.times{|i| r.set("test#{i}", i)} }
  6. end
  7. b.report("With pipelined inside") do
  8. 100000.times{|i| r.pipelined {r.set( "test#{i}", i)} }
  9. end
  10. b.report("No pipeline") do
  11. 100000.times{|i| r.set("test#{i}", i)}
  12. end
  13. end
Add Comment
Please, Sign In to add comment