summaryrefslogtreecommitdiff
path: root/benchmark/objspace_dump_all.yml
blob: ebab562d2ee04b381f234f5c09f270f1c7efd82c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
prelude: |
  require 'objspace'
  require 'tempfile'
  $objs = 1_000.times.map { Object.new }
  $strings = 1_000.times.map { |i| "string #{i}" }
  $file = Tempfile.new('heap')
  $dev_null = File.open(File::NULL, 'w+')

benchmark:
  dump_all_string: "ObjectSpace.dump_all(output: :string)"
  dump_all_file: "ObjectSpace.dump_all(output: $file)"
  dump_all_dev_null: "ObjectSpace.dump_all(output: $dev_null)"
loop_count: 1