Sha256: b5db5949bcf572f36abbf6d2e867e96e55fc1cc0d8d3e78d07ca2fefaf4c9b24

Contents?: true

Size: 906 Bytes

Versions: 13

Compression:

Stored size: 906 Bytes

Contents

# encoding: utf-8

require 'ruby-prof/exclude_common_methods'

module RubyProf
  class Profile
    # :nodoc:
    def measure_mode_string
      case self.measure_mode
        when WALL_TIME    then "wall_time"
        when PROCESS_TIME then "process_time"
        when ALLOCATIONS  then "allocations"
        when MEMORY       then "memory"
      end
    end

    # Hides methods that, when represented as a call graph, have
    # extremely large in and out degrees and make navigation impossible.
    def exclude_common_methods!
      ExcludeCommonMethods.apply!(self)
    end

    def exclude_methods!(mod, *method_or_methods)
      [method_or_methods].flatten.each do |name|
        exclude_method!(mod, name)
      end
    end

    def exclude_singleton_methods!(mod, *method_or_methods)
      exclude_methods!(mod.singleton_class, *method_or_methods)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ruby-prof-1.4.1-x64-mingw32 lib/ruby-prof/profile.rb
ruby-prof-1.4.1 lib/ruby-prof/profile.rb
ruby-prof-1.4.0-x64-mingw32 lib/ruby-prof/profile.rb
ruby-prof-1.4.0 lib/ruby-prof/profile.rb
ruby-prof-1.3.2 lib/ruby-prof/profile.rb
ruby-prof-1.3.1-x64-mingw32 lib/ruby-prof/profile.rb
ruby-prof-1.3.1 lib/ruby-prof/profile.rb
ruby-prof-1.3.0-x64-mingw32 lib/ruby-prof/profile.rb
ruby-prof-1.3.0 lib/ruby-prof/profile.rb
ruby-prof-1.2.0 lib/ruby-prof/profile.rb
ruby-prof-1.1.0-x64-mingw32 lib/ruby-prof/profile.rb
ruby-prof-1.1.0 lib/ruby-prof/profile.rb
ruby-prof-1.0.0 lib/ruby-prof/profile.rb