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.47.5.1 examples/adapters/redis_client.rb
polyphony-0.47.5 examples/adapters/redis_client.rb
polyphony-0.47.4 examples/adapters/redis_client.rb
polyphony-0.47.3 examples/adapters/redis_client.rb
polyphony-0.47.2 examples/adapters/redis_client.rb
polyphony-0.47.1 examples/adapters/redis_client.rb
polyphony-0.47.0 examples/adapters/redis_client.rb
polyphony-0.46.1 examples/adapters/redis_client.rb
polyphony-0.46.0 examples/adapters/redis_client.rb
polyphony-0.45.5 examples/adapters/redis_client.rb
polyphony-0.45.4 examples/adapters/redis_client.rb
polyphony-0.45.2 examples/adapters/redis_client.rb
polyphony-0.45.1 examples/adapters/redis_client.rb