Sha256: b5378f231dbd8d1891201bed41eb317e92f1cfccec1dc09b69923486bb1fd930
Contents?: true
Size: 654 Bytes
Versions: 5
Compression:
Stored size: 654 Bytes
Contents
module Rack::PerftoolsProfiler class StartProfiling < Action include Rack::PerftoolsProfiler::Utils def initialize(*args) super request = Rack::Request.new(@env) @mode = let(request.GET['mode']) do |m| if m.nil? || m.empty? nil else m.to_sym end end end def act @profiler.start(@mode) end 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 end end
Version data entries
5 entries across 5 versions & 1 rubygems