summaryrefslogtreecommitdiff
path: root/benchmark/io_close.yml
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/io_close.yml')
-rw-r--r--benchmark/io_close.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/benchmark/io_close.yml b/benchmark/io_close.yml
new file mode 100644
index 0000000000..a552872884
--- /dev/null
+++ b/benchmark/io_close.yml
@@ -0,0 +1,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