Module: Rack::PerftoolsProfiler

Defined in:
lib/rack/perftools_profiler/profiler_middleware.rb,
lib/rack/perftools_profiler/profile_data_action.rb,
lib/rack/perftools_profiler/call_app_directly.rb,
lib/rack/perftools_profiler/start_profiling.rb,
lib/rack/perftools_profiler/stop_profiling.rb,
lib/rack/perftools_profiler/profile_once.rb,
lib/rack/perftools_profiler/return_data.rb,
lib/rack/perftools_profiler/profiler.rb,
lib/rack/perftools_profiler/action.rb,
lib/rack/perftools_profiler/utils.rb,
lib/rack/perftools_profiler.rb

Defined Under Namespace

Modules: Utils Classes: Action, CallAppDirectly, ProfileDataAction, ProfileOnce, Profiler, ProfilerArgumentError, ProfilerMiddleware, ProfilingError, ReturnData, StartProfiling, StopProfiling

Class Method Summary collapse

Class Method Details

.clear_dataObject

helpers for testing



23
24
25
# File 'lib/rack/perftools_profiler.rb', line 23

def self.clear_data
  Profiler.clear_data
end

.new(app, options = {}) ⇒ Object



18
19
20
# File 'lib/rack/perftools_profiler.rb', line 18

def self.new(app, options={})
  ProfilerMiddleware.new(app, options)
end

.with_profiling_off(app, options = {}) ⇒ Object



27
28
29
30
31
32
# File 'lib/rack/perftools_profiler.rb', line 27

def self.with_profiling_off(app, options = {})
  clear_data
  instance = ProfilerMiddleware.new(app, options)
  instance.force_stop
  instance
end