Sha256: e853bb5adb895bb311900701fb05ffa31cbf44cb8ea80e1298c4c3f2f60e3e73

Contents?: true

Size: 542 Bytes

Versions: 21

Compression:

Stored size: 542 Bytes

Contents

require File.dirname(__FILE__) + '/bench_model'

Benchmark.bm do |make|
  TIMES.times do
    make.report do
      thrs = []
      errs = 0
      10.times do
        thrs << Thread.new do
          1000.times do
            begin
              Widget.find(:all)
            rescue Exception => e
              errs += 1
              Widget.logger.warn e.to_s
            end
          end
          Widget.clear_active_connections!
        end
      end
      thrs.each {|t| t.join}
      puts "errors: #{errs}" if errs > 0
    end
  end
end

Version data entries

21 entries across 21 versions & 6 rubygems

Version Path
jashmenn-activerecord-jdbc-adapter-1.2.0 bench/bench_find_all_mt.rb