Last active
August 29, 2015 14:15
-
-
Save benweint/412cb89b2e139e25fa90 to your computer and use it in GitHub Desktop.
rbx allocation counting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
def log_allocated_objects | |
value = Rubinius::Metrics.data[:'memory.large.objects.total'] | |
puts "memory.large.objects.total = #{value}, class = #{value.class}" | |
end | |
loop do | |
log_allocated_objects | |
10000.times { Object.new } | |
sleep 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment