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