Sha256: 8947845919bcba9e817c59e2293ce0a25a7e94a490a8c5f9c4899f7f471083f9

Contents?: true

Size: 595 Bytes

Versions: 3

Compression:

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

3 entries across 3 versions & 1 rubygems

Version Path
newrelic_rpm-2.13.0.beta5 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.0.beta4 lib/new_relic/control/profiling.rb
newrelic_rpm-2.13.0.beta3 lib/new_relic/control/profiling.rb