Sha256: c2e8171d4aa2d07d1f75ee5cb2c2b08a5ac40190415095110c29f64d9517505b

Contents?: true

Size: 505 Bytes

Versions: 3

Compression:

Stored size: 505 Bytes

Contents

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
oria-0.1.1 benchmarks/redis_v_oria.rb
oria-0.1.0 benchmarks/redis_v_oria.rb
oria-0.0.3 benchmarks/redis_v_oria.rb