Class: Hone::Profilers::Base
- Inherits:
-
Object
- Object
- Hone::Profilers::Base
- Defined in:
- lib/hone/profilers/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#cpu_percent_for(method_info) ⇒ Object
Returns CPU percentage for a method (0.0-100.0).
-
#hotspots(threshold: 1.0) ⇒ Object
Returns all hotspots above threshold.
-
#initialize(profile_path) ⇒ Base
constructor
A new instance of Base.
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)
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
147 148 149 |
# File 'lib/hone/profilers/base.rb', line 147 def hotspots(threshold: 1.0) raise NotImplementedError end |