Class: Timeasure::Profiling::Manager

Inherits:
Object
  • Object
show all
Defined in:
lib/timeasure/profiling/manager.rb

Class Method Summary collapse

Class Method Details

.exportObject



18
19
20
21
# File 'lib/timeasure/profiling/manager.rb', line 18

def export
  handler = reported_methods_handler
  handler.nil? ? warn_unprepared_handler : handler.export
end

.prepareObject



9
10
11
# File 'lib/timeasure/profiling/manager.rb', line 9

def prepare
  Timeasure.configuration.reported_methods_handler_set_proc.call(ReportedMethodsHandler.new)
end

.report(measurement) ⇒ Object



13
14
15
16
# File 'lib/timeasure/profiling/manager.rb', line 13

def report(measurement)
  handler = reported_methods_handler
  handler.nil? ? warn_unprepared_handler : handler.report(measurement)
end