mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
ZJIT: Skip empty counter sections in stats
This commit is contained in:
parent
6566003712
commit
cbe65ebbc3
Notes:
git
2025-11-18 21:58:18 +00:00
2
zjit.rb
2
zjit.rb
@ -297,7 +297,7 @@ class << RubyVM::ZJIT
|
||||
|
||||
def print_counters_with_prefix(buf:, stats:, prefix:, prompt:, limit: nil)
|
||||
counters = stats.select { |key, value| key.start_with?(prefix) && value > 0 }
|
||||
return if stats.empty?
|
||||
return if counters.empty?
|
||||
|
||||
counters.transform_keys! { |key| key.to_s.delete_prefix(prefix) }
|
||||
key_pad = counters.keys.map(&:size).max
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user