File: benchmarks.rb

package info (click to toggle)
ruby-connection-pool 3.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 228 kB
  • sloc: ruby: 1,252; makefile: 6
file content (12 lines) | stat: -rw-r--r-- 266 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
# bundle exec ruby test/benchmarks.rb
require "benchmark/ips"
require "connection_pool"

puts "ConnectionPool #{ConnectionPool::VERSION}"
CP = ConnectionPool.new { Object.new }

Benchmark.ips do |x|
  x.report("ConnectionPool#with") do
    CP.with { |x| }
  end
end