Sha256: 6d0f35a00547fbeb22e853db30ba60491307fe0d1ab47dd45183cffa2f64acb7

Contents?: true

Size: 294 Bytes

Versions: 10

Compression:

Stored size: 294 Bytes

Contents

require "yaml"
require File.join(__dir__, "..", "lib", "allocation_stats")

stats = AllocationStats.trace do
  y = YAML.dump(["one string", "two string"]) # lots of objects from Rbconfig::CONFIG["rubylibdir"]
end

puts stats.allocations(alias_paths: true).group_by(:sourcefile, :class).to_text

Version data entries

10 entries across 9 versions & 2 rubygems

Version Path
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/allocation_stats-0.1.5/examples/trace_psych_group_by.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/allocation_stats-0.1.5/examples/trace_psych_group_by.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/allocation_stats-0.1.5/examples/trace_psych_group_by.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/allocation_stats-0.1.5/examples/trace_psych_group_by.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/allocation_stats-0.1.5/examples/trace_psych_group_by.rb
allocation_stats-0.1.5 examples/trace_psych_group_by.rb
allocation_stats-0.1.4 examples/trace_psych_group_by.rb
allocation_stats-0.1.3 examples/trace_psych_group_by.rb
allocation_stats-0.1.2 examples/trace_psych_group_by.rb
allocation_stats-0.1.1 examples/trace_psych_group_by.rb