4 ms·
For what it's worth, I checked Newrelic's gem (which is what I use to monitor my GC), and it does clean up after itself by invoking GC::Profiler::clear after a
by cheald 14y ago
For what it's worth, I checked Newrelic's gem (which is what I use to monitor my GC), and it does clean up after itself by invoking GC::Profiler::clear after a run.
Still though, that's ugly. There are a number of places where Ruby as a systems scripting language (small scripts, short runtime) really clashes with Ruby as an application language (large apps, long runtime), and the GC seems to be at the heart of most of them.
- hcarvalhoalves 14y ago> There are a number of places where Ruby as a systems scripting language (small scripts, short runtime) really clashes with Ruby as an application language (large apps, long runtime) ... I guess this sums the problem perfectly.
- wpeterson 14y agoConfirmed that this only leaks memory if used incorrectly, standard implementations like Newrelic sample this safely, without leaking memory. Here's a link to the GC profiling agent code in the Newrelic Agent: https://github.com/newrelic/rpm/blob/master/lib/new_relic/agent/stats_engine/gc_profiler.rb#L94 https://github.com/newrelic/rpm/blob/master/lib/new_relic/ag...