⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (366 Bytes)
Feature #4531
» io_select_using_poll_test.rb
contrived test case -
normalperson (Eric Wong)
, 03/29/2011 01:59 AM
require
"benchmark"
ios
=
[]
nr
=
1000000
max
=
Process
.
getrlimit
(
Process
::
RLIMIT_NOFILE
)[
0
]
puts
"max fd:
#{
max
}
(results not apparent with <= 1024 max fd)"
((
max
/
2
)
-
2
).
times
do
ios
.
concat
IO
.
pipe
end
last
=
[
ios
[
-
1
]
]
puts
"last IO:
#{
last
[
0
].
inspect
}
"
p
(
Benchmark
.
measure
do
nr
.
times
do
IO
.
select
nil
,
last
end
end
)
puts
"GC.count:
#{
GC
.
count
}
"
« Previous
1
2
3
4
…
6
Next »
(2-2/6)
Loading...