Sha256: 1f2f4434e3af25e2076841f0d61b25a41dc030bb7ffa4c0370a6488a399655b9

Contents?: true

Size: 920 Bytes

Versions: 8

Compression:

Stored size: 920 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
          "wall_time"
        when PROCESS_TIME
          "process_time"
        when ALLOCATIONS
          "allocations"
        when MEMORY
          "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

8 entries across 8 versions & 1 rubygems

Version Path
ruby-prof-1.4.5-x64-mingw-ucrt lib/ruby-prof/profile.rb
ruby-prof-1.4.5 lib/ruby-prof/profile.rb
ruby-prof-1.4.4-x64-mingw-ucrt lib/ruby-prof/profile.rb
ruby-prof-1.4.4 lib/ruby-prof/profile.rb
ruby-prof-1.4.3-x64-mingw32 lib/ruby-prof/profile.rb
ruby-prof-1.4.3 lib/ruby-prof/profile.rb
ruby-prof-1.4.2-x64-mingw32 lib/ruby-prof/profile.rb
ruby-prof-1.4.2 lib/ruby-prof/profile.rb