summaryrefslogtreecommitdiff
path: root/benchmark/bm_file_chmod.rb
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/bm_file_chmod.rb')
-rw-r--r--benchmark/bm_file_chmod.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/benchmark/bm_file_chmod.rb b/benchmark/bm_file_chmod.rb
new file mode 100644
index 0000000000..1cd4760c9d
--- /dev/null
+++ b/benchmark/bm_file_chmod.rb
@@ -0,0 +1,9 @@
+# chmod file
+require 'tempfile'
+max = 200_000
+tmp = Tempfile.new('chmod')
+path = tmp.path
+max.times do
+ File.chmod(0777, path)
+end
+tmp.close!