Sha256: e3c2b9bc69889f7331d3ec61770748bda52ca7ba98d9921bfcf622814f6454d0

Contents?: true

Size: 1.74 KB

Versions: 23

Compression:

Stored size: 1.74 KB

Contents

# encoding: utf-8
require 'rubygems/version'

# Load the C-based binding.
begin
  version = Gem::Version.new(RUBY_VERSION)
  require "#{version.segments[0..1].join('.')}/ruby_prof.so"
rescue LoadError
  require "ruby_prof.so"
end

require 'ruby-prof/version'
require 'ruby-prof/call_tree'
require 'ruby-prof/compatibility'
require 'ruby-prof/measurement'
require 'ruby-prof/method_info'
require 'ruby-prof/profile'
require 'ruby-prof/rack'
require 'ruby-prof/thread'

module RubyProf
  autoload :CallTreeVisitor, 'ruby-prof/call_tree_visitor'
  autoload :AbstractPrinter, 'ruby-prof/printers/abstract_printer'
  autoload :CallInfoPrinter, 'ruby-prof/printers/call_info_printer'
  autoload :CallStackPrinter, 'ruby-prof/printers/call_stack_printer'
  autoload :CallTreePrinter, 'ruby-prof/printers/call_tree_printer'
  autoload :DotPrinter, 'ruby-prof/printers/dot_printer'
  autoload :FlatPrinter, 'ruby-prof/printers/flat_printer'
  autoload :GraphHtmlPrinter, 'ruby-prof/printers/graph_html_printer'
  autoload :GraphPrinter, 'ruby-prof/printers/graph_printer'
  autoload :MultiPrinter, 'ruby-prof/printers/multi_printer'

  # :nodoc:
  # Checks if the user specified the clock mode via
  # the RUBY_PROF_MEASURE_MODE environment variable
  def self.figure_measure_mode
    case ENV["RUBY_PROF_MEASURE_MODE"]
    when "wall", "wall_time"
      RubyProf.measure_mode = RubyProf::WALL_TIME
    when "allocations"
      RubyProf.measure_mode = RubyProf::ALLOCATIONS
    when "memory"
      RubyProf.measure_mode = RubyProf::MEMORY
    when "process", "process_time"
      RubyProf.measure_mode = RubyProf::PROCESS_TIME
    else
      # the default is defined in the measure_mode reader
    end
  end
end

RubyProf::figure_measure_mode

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
ruby-prof-1.7.1-x64-mingw-ucrt lib/ruby-prof.rb
ruby-prof-1.7.1 lib/ruby-prof.rb
ruby-prof-1.7.0-x64-mingw-ucrt lib/ruby-prof.rb
ruby-prof-1.7.0 lib/ruby-prof.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/ruby-prof-1.6.3/lib/ruby-prof.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/ruby-prof-1.6.3/lib/ruby-prof.rb
ruby-prof-1.6.3-x64-mingw-ucrt lib/ruby-prof.rb
ruby-prof-1.6.3 lib/ruby-prof.rb
ruby-prof-1.6.2-x64-mingw-ucrt lib/ruby-prof.rb
ruby-prof-1.6.2 lib/ruby-prof.rb
ruby-prof-1.6.1 lib/ruby-prof.rb
ruby-prof-1.6.1-x64-mingw-ucrt lib/ruby-prof.rb
ruby-prof-1.5.0-x64-mingw-ucrt lib/ruby-prof.rb
ruby-prof-1.5.0 lib/ruby-prof.rb
ruby-prof-1.4.5-x64-mingw-ucrt lib/ruby-prof.rb
ruby-prof-1.4.5 lib/ruby-prof.rb
ruby-prof-1.4.2-x64-mingw32 lib/ruby-prof.rb
ruby-prof-1.4.2 lib/ruby-prof.rb
ruby-prof-1.4.1-x64-mingw32 lib/ruby-prof.rb
ruby-prof-1.4.1 lib/ruby-prof.rb