Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
GC.measure_total_time=
GC.measure_total_time = true/false
gc.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/gc.rb, line 296
def self.measure_total_time=(flag)
Primitive.cstmt! %{
rb_objspace.flags.measure_gc = RTEST(flag) ? TRUE : FALSE;
return flag;
}
end
Enable to measure GC time. You can get the result with GC.stat(:time). Note that GC time measurement can cause some performance overhead.
See also
.measure_total_time
.remove_stress_to_class
.malloc_allocations
.start
also in
4.1 · 4.0 · 3.4 · 3.2 · 3.1