ruby/benchmark/io_close.yml

13 lines
251 B
YAML

prelude: |
ios = 1000.times.map do
100.times.map{IO.pipe}
end
benchmark:
# Close IO
io_close: |
# Process each batch of ios per iteration of the benchmark.
ios.pop.each do |r, w|
r.close
w.close
end
loop_count: 100