Sha256: 518542cd1917a0ba5d38f319481e3fbd1098b374c048f3ddb954729053b621ce

Contents?: true

Size: 671 Bytes

Versions: 74

Compression:

Stored size: 671 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::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

74 entries across 74 versions & 1 rubygems

Version Path
appsignal-4.2.0-java lib/appsignal/hooks/gvl.rb
appsignal-4.2.0 lib/appsignal/hooks/gvl.rb
appsignal-4.1.3-java lib/appsignal/hooks/gvl.rb
appsignal-4.1.3 lib/appsignal/hooks/gvl.rb
appsignal-4.1.2-java lib/appsignal/hooks/gvl.rb
appsignal-4.1.2 lib/appsignal/hooks/gvl.rb
appsignal-4.1.1-java lib/appsignal/hooks/gvl.rb
appsignal-4.1.1 lib/appsignal/hooks/gvl.rb
appsignal-4.1.0-java lib/appsignal/hooks/gvl.rb
appsignal-4.1.0 lib/appsignal/hooks/gvl.rb
appsignal-4.0.9-java lib/appsignal/hooks/gvl.rb
appsignal-4.0.9 lib/appsignal/hooks/gvl.rb
appsignal-4.0.8-java lib/appsignal/hooks/gvl.rb
appsignal-4.0.8 lib/appsignal/hooks/gvl.rb
appsignal-4.0.7-java lib/appsignal/hooks/gvl.rb
appsignal-4.0.7 lib/appsignal/hooks/gvl.rb
appsignal-4.0.6-java lib/appsignal/hooks/gvl.rb
appsignal-4.0.6 lib/appsignal/hooks/gvl.rb
appsignal-4.0.5-java lib/appsignal/hooks/gvl.rb
appsignal-4.0.5 lib/appsignal/hooks/gvl.rb