1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/benchmark/bm_require_thread.rb
kosaki 8c84716b24 * benchmark/bm_require.rb: new benchmark for require.
* benchmark/bm_require_thread.rb: new benchmark for conflicting
  require vs thread. like [Bug #11559]
* prepare_require.rb: new file for preparing above tests.
* prepare_require.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-08 21:31:49 +00:00

15 lines
189 B
Ruby

$:.push File.join(File.dirname(__FILE__), "bm_require.data")
i=0
t = Thread.new do
while true
i = i+1 # dummy loop
end
end
1.upto(100) do |i|
require "c#{i}"
end
$:.pop
t.kill