Class: Promenade::YJIT::Stats
- Inherits:
-
Object
- Object
- Promenade::YJIT::Stats
- Defined in:
- lib/promenade/yjit/stats.rb
Constant Summary collapse
- RUNTIME_STATS =
%i( code_region_size ratio_in_yjit ).freeze
Class Method Summary collapse
Class Method Details
.instrument ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/promenade/yjit/stats.rb', line 17 def self.instrument return unless defined?(::RubyVM::YJIT) && ::RubyVM::YJIT.enabled? ::RubyVM::YJIT.runtime_stats.select { |stat, _| RUNTIME_STATS.include? stat }.each do |stat, value| Promenade.metric(:"ruby_yjit_#{stat}").set({}, value) end end |