Class: Timeasure::Profiling::ReportedMethodsHandler
- Inherits:
-
Object
- Object
- Timeasure::Profiling::ReportedMethodsHandler
- Defined in:
- lib/timeasure/profiling/reported_methods_handler.rb
Instance Method Summary collapse
- #export ⇒ Object
-
#initialize ⇒ ReportedMethodsHandler
constructor
A new instance of ReportedMethodsHandler.
- #report(measurement) ⇒ Object
Constructor Details
#initialize ⇒ ReportedMethodsHandler
Returns a new instance of ReportedMethodsHandler.
4 5 6 |
# File 'lib/timeasure/profiling/reported_methods_handler.rb', line 4 def initialize @reported_methods = {} end |
Instance Method Details
#export ⇒ Object
15 16 17 |
# File 'lib/timeasure/profiling/reported_methods_handler.rb', line 15 def export @reported_methods.values end |
#report(measurement) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/timeasure/profiling/reported_methods_handler.rb', line 8 def report(measurement) initialize_path_for(measurement) if path_uninitialized_for(measurement) @reported_methods[measurement.full_path].increment_runtime_sum(measurement.runtime_in_milliseconds) @reported_methods[measurement.full_path].increment_call_count end |