mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
[DOC] Document undocumented methods in ZJIT
This commit is contained in:
parent
da6198de8f
commit
238aaa4cda
2
zjit.rb
2
zjit.rb
@ -61,6 +61,7 @@ class << RubyVM::ZJIT
|
||||
buf
|
||||
end
|
||||
|
||||
# Outputs counters into +buf+.
|
||||
def print_counters(keys, buf:, stats:)
|
||||
left_pad = keys.map(&:size).max + 1
|
||||
keys.each do |key|
|
||||
@ -82,6 +83,7 @@ class << RubyVM::ZJIT
|
||||
end
|
||||
end
|
||||
|
||||
# Similar to #print_counters but only includes keys that start with +prefix+.
|
||||
def print_counters_with_prefix(buf:, stats:, prefix:, prompt:)
|
||||
keys = stats.keys.select { |key| key.start_with?(prefix) && stats[key] > 0 }
|
||||
unless keys.empty?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user