Sha256: 9c8386582c6c0f22e24e4fd84a6bd5a1ee0f0ee8dc38f0739afbc37ab4227f6c

Contents?: true

Size: 680 Bytes

Versions: 60

Compression:

Stored size: 680 Bytes

Contents

# frozen_string_literal: true

module Appsignal
  class Hooks
    # @api private
    class GvlHook < Appsignal::Hooks::Hook
      register :gvl

      def dependencies_present?
        return false if Appsignal::System.jruby?

        require "gvltools"
        Appsignal.config && Appsignal::Probes::GvlProbe.dependencies_present?
      rescue LoadError
        false
      end

      def install
        Appsignal::Minutely.probes.register :gvl, Appsignal::Probes::GvlProbe
        ::GVLTools::GlobalTimer.enable if Appsignal.config[:enable_gvl_global_timer]
        ::GVLTools::WaitingThreads.enable if Appsignal.config[:enable_gvl_waiting_threads]
      end
    end
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
appsignal-3.7.0-java lib/appsignal/hooks/gvl.rb
appsignal-3.7.0 lib/appsignal/hooks/gvl.rb
appsignal-3.6.5-java lib/appsignal/hooks/gvl.rb
appsignal-3.6.5 lib/appsignal/hooks/gvl.rb
appsignal-3.6.4-java lib/appsignal/hooks/gvl.rb
appsignal-3.6.4 lib/appsignal/hooks/gvl.rb
appsignal-3.6.3-java lib/appsignal/hooks/gvl.rb
appsignal-3.6.3 lib/appsignal/hooks/gvl.rb
appsignal-3.6.2-java lib/appsignal/hooks/gvl.rb
appsignal-3.6.2 lib/appsignal/hooks/gvl.rb
appsignal-3.6.1-java lib/appsignal/hooks/gvl.rb
appsignal-3.6.1 lib/appsignal/hooks/gvl.rb
appsignal-3.6.0-java lib/appsignal/hooks/gvl.rb
appsignal-3.6.0 lib/appsignal/hooks/gvl.rb
appsignal-3.5.6-java lib/appsignal/hooks/gvl.rb
appsignal-3.5.6 lib/appsignal/hooks/gvl.rb
appsignal-3.5.5-java lib/appsignal/hooks/gvl.rb
appsignal-3.5.5 lib/appsignal/hooks/gvl.rb
appsignal-3.5.4-java lib/appsignal/hooks/gvl.rb
appsignal-3.5.4 lib/appsignal/hooks/gvl.rb