Skip to content

Commit

Permalink
Don't error on not yet known GC metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Envek committed Jan 4, 2024
1 parent 466c478 commit f737bde
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/yabeda/gc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ module GC
stats = ::GC.stat

stats.each do |stat_name, value|
__send__("gc_#{stat_name}").set(EMPTY_HASH, value)
next unless ::Yabeda.gc.respond_to?(stat_name)

::Yabeda.gc.__send__(stat_name).set(EMPTY_HASH, value)
end
end
end
Expand Down

0 comments on commit f737bde

Please sign in to comment.