Skip to content

Commit

Permalink
Minor refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Mar 2, 2019
1 parent fa1244a commit 54f0c7d
Showing 1 changed file with 6 additions and 6 deletions.
Expand Up @@ -27,28 +27,28 @@
Benchmark.ips do |x|
x.report("async-redis") do |times|
endpoint = Async::Redis.local_endpoint

Async do
client = Async::Redis::Client.new(endpoint)

while (times -= 1) >= 0
client.set(["X","Y","Z"].sample, rand(1..10))
end

# ensure
client.close
end
end

x.report("redis-rb") do |times|
redis = Redis.new

while (times -= 1) >= 0
redis.set(["X","Y","Z"].sample, rand(1..10))
end
end

x.compare!

end
end
end

0 comments on commit 54f0c7d

Please sign in to comment.