Class: Rack::PerftoolsProfiler::StartProfiling

Inherits:
Action
  • Object
show all
Defined in:
lib/rack/perftools_profiler/start_profiling.rb

Instance Method Summary collapse

Methods inherited from Action

for_env, #initialize

Constructor Details

This class inherits a constructor from Rack::PerftoolsProfiler::Action

Instance Method Details

#actObject



5
6
7
# File 'lib/rack/perftools_profiler/start_profiling.rb', line 5

def act
  @profiler.start
end

#responseObject



9
10
11
12
13
14
15
16
17
# File 'lib/rack/perftools_profiler/start_profiling.rb', line 9

def response
  [200, {'Content-Type' => 'text/plain'}, 
   [<<-EOS
Profiling is now enabled.
Visit the URLS that should be profiled.
When you are finished, visit /__stop__, then visit /__data__ to view the results.
EOS
   ]]
end