summaryrefslogtreecommitdiff
path: root/benchmark/bm_dir_empty_p.rb
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/bm_dir_empty_p.rb')
-rw-r--r--benchmark/bm_dir_empty_p.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/benchmark/bm_dir_empty_p.rb b/benchmark/bm_dir_empty_p.rb
new file mode 100644
index 0000000000..8329c757cf
--- /dev/null
+++ b/benchmark/bm_dir_empty_p.rb
@@ -0,0 +1,5 @@
+require 'tmpdir'
+max = 100_000
+Dir.mktmpdir('bm_dir_empty_p') do |dir|
+ max.times { Dir.empty?(dir) }
+end