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