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