Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

class method

GC.measure_total_time=

[T] (T enable) -> T
GC.measure_total_time = true/false

Enables measuring GC time. You can get the result with GC.stat(:time). Note that GC time measurement can cause some performance overhead.