require 'rubygems' require 'redis' require '../lib/oria' require 'benchmark' redis = Redis.new n = (ARGV.shift || 1000).to_i Benchmark.bm(15) do |bm| bm.report("Redis (write):") do n.times do redis['foo'] = 'bar' end end bm.report("Oria (write):") do n.times do Oria['foo'] = 'bar' end end bm.report("Redis (read):") do n.times do foo = redis['foo'] end end bm.report("Oria (read):") do n.times do foo = Oria['foo'] end end end