Sha256: f407333422f8621da60b64c56f72d7ec1fbf7233f1b9312cbc0425712a0ff001

Contents?: true

Size: 314 Bytes

Versions: 103

Compression:

Stored size: 314 Bytes

Contents

# Run with
#
#   $ ruby -Ilib benchmarking/speed.rb
#

require "benchmark"
require "redis"

r = Redis.new
n = (ARGV.shift || 20000).to_i

elapsed = Benchmark.realtime do
  # n sets, n gets
  n.times do |i|
    key = "foo#{i}"
    r[key] = key * 10
    r[key]
  end
end

puts '%.2f Kops' % (2 * n / 1000 / elapsed)

Version data entries

103 entries across 101 versions & 16 rubygems

Version Path
remq-0.0.3 vendor/bundle/gems/redis-3.0.2/benchmarking/speed.rb
classiccms-0.6.9 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
classiccms-0.6.8 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
classiccms-0.6.7 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
classiccms-0.6.6 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
classiccms-0.6.5 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
classiccms-0.6.4 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
classiccms-0.6.3 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
classiccms-0.6.2 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
classiccms-0.6.1 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
redis-3.0.2 benchmarking/speed.rb
classiccms-0.6.0 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
classiccms-0.5.17 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
classiccms-0.5.16 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
classiccms-0.5.15 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
classiccms-0.5.14 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
classiccms-0.5.13 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
classiccms-0.5.12 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
classiccms-0.5.11 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb
classiccms-0.5.10 vendor/bundle/gems/redis-2.2.2/benchmarking/speed.rb