diff options
author | Peter Zhu <[email protected]> | 2023-02-14 15:55:25 -0500 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2023-02-21 08:05:31 -0500 |
commit | 93ac7405b80cc61930d73da04441fa09af1851e1 () | |
tree | 03b5a1f70186beee0b1dd01a44dfeda47f11d237 /gc.rb | |
parent | d7c1ca48bf7754a23bfe1559422736029b4787a0 (diff) |
Add marking and sweeping time to GC.stat
There is a `time` key in GC.stat that gives us the total time spent in GC. However, we don't know what proportion of the time is spent between marking and sweeping. This makes it difficult to tune the GC as we're not sure where to focus our efforts on. This PR adds keys `marking_time` and `sweeping_time` to GC.stat for the time spent marking and sweeping, in milliseconds. [Feature #19437]
Notes: Merged: https://.com/ruby/ruby/pull/7304
-rw-r--r-- | gc.rb | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -282,7 +282,7 @@ module GC # Return measured \GC total time in nano seconds. def self.total_time Primitive.cexpr! %{ - ULL2NUM(rb_objspace.profile.total_time_ns) } end end |