You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to add a few metrics about YJIT in the Process instrumentation to understand the YJIT performance.
These metrics depend on the RUBYOPT=--yjit-stats flag and Ruby::YJIT.runtime_stats API.
When the Ruby process starts with --yjit-stats or RUBYOPT=--yjit-stats, the Ruby::YJIT.runtime_stats produces performance stats. Otherwise, Ruby::YJIT.runtime_stats returns nil. Naturally, I would propose to add:
A new function collect_yjit_metrics in the Process#collect.
collect_yjit_metrics collects:
ratio_in_yjit: the percentage of total YARV instructions executed by YJIT as opposed to the CRuby interpreter
Hey!
I want to add a few metrics about
YJIT
in theProcess
instrumentation to understand the YJIT performance.These metrics depend on the
RUBYOPT=--yjit-stats
flag andRuby::YJIT.runtime_stats
API.When the Ruby process starts with
--yjit-stats
orRUBYOPT=--yjit-stats
, theRuby::YJIT.runtime_stats
produces performance stats. Otherwise,Ruby::YJIT.runtime_stats
returnsnil
. Naturally, I would propose to add:collect_yjit_metrics
in theProcess#collect
.collect_yjit_metrics
collects:ratio_in_yjit
: the percentage of total YARV instructions executed by YJIT as opposed to the CRuby interpretercode_region_size
yjit_alloc_size
code_gc_count
compiled_iseq_count
yjit_insns_count
side_exit_count
total_exit_count
avg_len_in_yjit
Reference: Ruby YJIT Docuementation
The text was updated successfully, but these errors were encountered: