Class: Hone::Profilers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/hone/profilers/base.rb

Direct Known Subclasses

MemoryProfiler, StackProf, Vernier

Instance Method Summary collapse

Constructor Details

#initialize(profile_path) ⇒ Base

Returns a new instance of Base.



136
137
138
139
# File 'lib/hone/profilers/base.rb', line 136

def initialize(profile_path)
  @profile_path = profile_path
  @data = load_profile(profile_path)
end

Instance Method Details

#cpu_percent_for(method_info) ⇒ Object

Returns CPU percentage for a method (0.0-100.0)

Raises:

  • (NotImplementedError)


142
143
144
# File 'lib/hone/profilers/base.rb', line 142

def cpu_percent_for(method_info)
  raise NotImplementedError
end

#hotspots(threshold: 1.0) ⇒ Object

Returns all hotspots above threshold

Raises:

  • (NotImplementedError)


147
148
149
# File 'lib/hone/profilers/base.rb', line 147

def hotspots(threshold: 1.0)
  raise NotImplementedError
end