Sha256: 08d3fb49312f1b0f966729c24f31d182e3849d03a205c6fa28815f8960c6f5af

Contents?: true

Size: 426 Bytes

Versions: 73

Compression:

Stored size: 426 Bytes

Contents

# frozen_string_literal: true

require 'bundler/setup'
require 'polyphony/adapters/redis'

::Exception.__disable_sanitized_backtrace__ = true

redis = Redis.new(host: ENV['REDIS_HOST'] || 'localhost')

X = 10

t0 = Time.now
X.times { redis.get('abc') }
puts "get rate: #{X / (Time.now - t0)} reqs/s"

puts "abc = #{redis.get('abc')}"

puts 'updating value...'
redis.set('abc', Time.now.to_s)

puts "abc = #{redis.get('abc')}"

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
polyphony-0.99 examples/adapters/redis_client.rb
polyphony-0.98 examples/adapters/redis_client.rb
polyphony-0.97 examples/adapters/redis_client.rb
polyphony-0.96 examples/adapters/redis_client.rb
polyphony-0.95 examples/adapters/redis_client.rb
polyphony-0.94 examples/adapters/redis_client.rb
polyphony-0.93 examples/adapters/redis_client.rb
polyphony-0.92 examples/adapters/redis_client.rb
polyphony-0.91 examples/adapters/redis_client.rb
polyphony-0.90 examples/adapters/redis_client.rb
polyphony-0.89 examples/adapters/redis_client.rb
polyphony-0.87 examples/adapters/redis_client.rb
polyphony-0.86 examples/adapters/redis_client.rb
polyphony-0.85 examples/adapters/redis_client.rb
polyphony-0.84.1 examples/adapters/redis_client.rb
polyphony-0.84 examples/adapters/redis_client.rb
polyphony-0.83 examples/adapters/redis_client.rb
polyphony-0.82 examples/adapters/redis_client.rb
polyphony-0.81.1 examples/adapters/redis_client.rb
polyphony-0.81 examples/adapters/redis_client.rb