Sha256: 0160d78cf9a8645ea0cec6102972e86656db27e48c79465a9144ed0760a070ce
Contents?: true
Size: 445 Bytes
Versions: 118
Compression:
Stored size: 445 Bytes
Contents
#!/usr/bin/env ruby # encoding: utf-8 require "rubygems" require "bunny" require "benchmark" conn = Bunny.new conn.start puts puts "-" * 80 puts "Benchmarking on #{RUBY_DESCRIPTION}" n = 500 # warm up the JIT, etc puts "Doing a warmup run..." 1000.times { conn.create_channel } t = Benchmark.realtime do n.times { conn.create_channel } end r = (n.to_f/t.to_f) puts "channel.open rate: #{(r / 1000).round(2)} KGHz" puts puts "-" * 80
Version data entries
118 entries across 118 versions & 1 rubygems