diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2020-07-28 12:58:49 +0200 |
|---|---|---|
| committer | Aaron Patterson <aaron.patterson@gmail.com> | 2020-09-09 08:05:14 -0700 |
| commit | b49a8704143ce47de0472b6033fc5797aed21f52 (patch) | |
| tree | 857f361ac78624430dc6a7b83f473eb13311c6dd /spec | |
| parent | 01828a955a2d776263bda84ee12d9ea922bbfa01 (diff) | |
Add a :since option to dump_all
This is useful to see what a block of code allocated, e.g.
```
GC.start
GC.disable
ObjectSpace.trace_object_allocations do
# run some code
end
gc_gen = GC.count
allocations = ObjectSpace.dump_all(output: :file, since: gc_gen)
GC.enable
GC.start
retentions = ObjectSpace.dump_all(output: :file, since: gc_gen)
```
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3368
Diffstat (limited to 'spec')
0 files changed, 0 insertions, 0 deletions
