Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method · added in Ruby 3.1
GC.total_time
GC.total_time → int
gc.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/gc.rb, line 318
def self.total_time
Primitive.cexpr! %{
ULL2NUM(rb_objspace.profile.marking_time_ns + rb_objspace.profile.sweeping_time_ns)
}
end
Return measured GC total time in nano seconds.
Ruby version changes
-
3.1
-
GC.total_timereturns measured time in nano-seconds. [[Feature #10917]]
-
See also
.stress=
.verify_compaction_references
.stress
.verify_internal_consistency
also in
4.1 · 4.0 · 3.4 · 3.2 · 3.1