Sha256: f78092e1a8e9b9f7c134fe0244f8abf5414a0c36e8150398e015930de01c32d2

Contents?: true

Size: 588 Bytes

Versions: 18

Compression:

Stored size: 588 Bytes

Contents

module NewRelic
  class Control
    module Profiling

      # A flag used in dev mode to indicate if profiling is available
      def profiling?
        @profiling
      end

      def profiling_available?
        @profiling_available ||=
          begin
            require 'ruby-prof'
            true
          rescue LoadError; end
      end
      # Set the flag for capturing profiles in dev mode.  If RubyProf is not
      # loaded a true value is ignored.
      def profiling=(val)
        @profiling = profiling_available? && val && defined?(RubyProf)
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
newrelic_rpm-2.13.4.rum6 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.4.rum5 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.6.beta2 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.6.beta1 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.4.rum4 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.5.beta4 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.5.beta3 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.5.beta2 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.5.beta1 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.4.eum3 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.4.eum2 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.4.eum1 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.4 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.3 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.3.beta lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.2 lib/new_relic/control/profiling.rb
honkster-newrelic_rpm-2.13.1 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.1 lib/new_relic/control/profiling.rb