ruby-changes:19352
From: kosaki <ko1@a...>
Date: Sat, 30 Apr 2011 16:49:34 +0900 (JST)
Subject: [ruby-changes:19352] Ruby:r31392 (trunk): * benchmark/bm_io_select3.rb: New.
kosaki 2011-04-30 16:49:29 +0900 (Sat, 30 Apr 2011) New Revision: 31392 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31392 Log: * benchmark/bm_io_select3.rb: New. Added files: trunk/benchmark/bm_io_select3.rb Modified files: trunk/ChangeLog trunk/benchmark/bm_io_select2.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 31391) +++ ChangeLog (revision 31392) @@ -1,3 +1,7 @@ +Sat Apr 30 16:48:36 2011 KOSAKI Motohiro <kosaki.motohiro@g...> + + * benchmark/bm_io_select3.rb: New. + Sat Apr 30 16:27:09 2011 KOSAKI Motohiro <kosaki.motohiro@g...> * io.c (copy_stream_body, rb_io_s_copy_stream): move rb_fd_init() Index: benchmark/bm_io_select3.rb =================================================================== --- benchmark/bm_io_select3.rb (revision 0) +++ benchmark/bm_io_select3.rb (revision 31392) @@ -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 + Property changes on: benchmark/bm_io_select3.rb ___________________________________________________________________ Added: svn:eol-style + LF Index: benchmark/bm_io_select2.rb =================================================================== --- benchmark/bm_io_select2.rb (revision 31391) +++ benchmark/bm_io_select2.rb (revision 31392) @@ -1,4 +1,4 @@ -# IO.select performance. worst case +# IO.select performance. worst case of single fd. ios = [] nr = 1000000 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/