Sha256: 936f590e3f5cb9fdb633760e6496bf152bda2b95761dba3732d7318511cc670d

Contents?: true

Size: 716 Bytes

Versions: 12

Compression:

Stored size: 716 Bytes

Contents

require 'benchmark/ips'
require 'oxblood/protocol'
require 'redis/connection/command_helper'

CommandHelper = Object.new.tap { |o| o.extend Redis::Connection::CommandHelper }

command = [:set, 'foo', ['bar', Float::INFINITY, -Float::INFINITY, 3]]
command_name = :set
command_args = ['foo', ['bar', Float::INFINITY, -Float::INFINITY, 3]]
p ch_result = CommandHelper.build_command(command)
p ox_result = Oxblood::Protocol.build_command(command_name, *command_args)
raise unless ch_result == ox_result

Benchmark.ips do |x|
  x.config(warmup: 20, benchmark: 10)
  x.report('redis-ruby') { CommandHelper.build_command(command) }
  x.report('Oxblood') { Oxblood::Protocol.build_command(command_name, *command_args) }
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
oxblood-0.3.0 benchmarks/serializer.rb
oxblood-0.2.0 benchmarks/serializer.rb
oxblood-0.1.0 benchmarks/serializer.rb
oxblood-0.1.0.dev12 benchmarks/serializer.rb
oxblood-0.1.0.dev11 benchmarks/serializer.rb
oxblood-0.1.0.dev10 benchmarks/serializer.rb
oxblood-0.1.0.dev9 benchmarks/serializer.rb
oxblood-0.1.0.dev8 benchmarks/serializer.rb
oxblood-0.1.0.dev7 benchmarks/serializer.rb
oxblood-0.1.0.dev6 benchmarks/serializer.rb
oxblood-0.1.0.dev5 benchmarks/serializer.rb
oxblood-0.1.0.dev4 benchmarks/serializer.rb