зеркало из https://github.com/github/ruby.git
* benchmark/bm_io_select3.rb: New.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
98c7ca9b65
Коммит
5201602c27
|
@ -1,3 +1,7 @@
|
|||
Sat Apr 30 16:48:36 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* benchmark/bm_io_select3.rb: New.
|
||||
|
||||
Sat Apr 30 16:27:09 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* io.c (copy_stream_body, rb_io_s_copy_stream): move rb_fd_init()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# IO.select performance. worst case
|
||||
# IO.select performance. worst case of single fd.
|
||||
|
||||
ios = []
|
||||
nr = 1000000
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
# IO.select performance. a lot of fd
|
||||
|
||||
ios = []
|
||||
nr = 100
|
||||
max = Process.getrlimit(Process::RLIMIT_NOFILE)[0]
|
||||
puts "max fd: #{max} (results not apparent with <= 1024 max fd)"
|
||||
|
||||
(max - 10).times do
|
||||
r, w = IO.pipe
|
||||
r.close
|
||||
ios.push w
|
||||
end
|
||||
|
||||
nr.times do
|
||||
IO.select nil, ios
|
||||
end
|
||||
|
Загрузка…
Ссылка в новой задаче