Sha256: 2a9a1d42b1c763b372f2f3497547495da3d80719aae169e01717949532a4e387

Contents?: true

Size: 443 Bytes

Versions: 17

Compression:

Stored size: 443 Bytes

Contents

# Some classes used in measurement tests
class Allocator
  def make_arrays
    10.times {|i| Array.new}
  end

  def make_hashes
    Hash.new
    Hash.new
    Hash.new
    Hash.new
    Hash.new
  end

  def make_strings
    a_string = 'a'
    b_string = a_string * 100
    String.new(b_string)
  end

  def internal_run
    make_arrays
    make_hashes
    make_strings
  end

  def run
    internal_run
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ruby-prof-1.4.3-x64-mingw32 test/measure_allocations.rb
ruby-prof-1.4.3 test/measure_allocations.rb
ruby-prof-1.4.2-x64-mingw32 test/measure_allocations.rb
ruby-prof-1.4.2 test/measure_allocations.rb
ruby-prof-1.4.1-x64-mingw32 test/measure_allocations.rb
ruby-prof-1.4.1 test/measure_allocations.rb
ruby-prof-1.4.0-x64-mingw32 test/measure_allocations.rb
ruby-prof-1.4.0 test/measure_allocations.rb
ruby-prof-1.3.2 test/measure_allocations.rb
ruby-prof-1.3.1-x64-mingw32 test/measure_allocations.rb
ruby-prof-1.3.1 test/measure_allocations.rb
ruby-prof-1.3.0-x64-mingw32 test/measure_allocations.rb
ruby-prof-1.3.0 test/measure_allocations.rb
ruby-prof-1.2.0 test/measure_allocations.rb
ruby-prof-1.1.0-x64-mingw32 test/measure_allocations.rb
ruby-prof-1.1.0 test/measure_allocations.rb
ruby-prof-1.0.0 test/measure_allocations.rb