summaryrefslogtreecommitdiff
path: root/benchmark/io_close.yml
blob: a552872884b3ee658a4094ddd682daed9c87edd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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