Class: Rack::Timing::Start

Inherits:
Base
  • Object
show all
Defined in:
lib/timing/start.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Notify

#notify, #should_notify?

Constructor Details

This class inherits a constructor from Rack::Timing::Base

Instance Method Details

#call(env) ⇒ Object

This rack should run as early in the stack as possible.



6
7
8
9
10
11
# File 'lib/timing/start.rb', line 6

def call(env)
  env["RACK_IN_START"] = time_ms
  status, headers, response = @app.call(env)
  env["RACK_OUT_END"] = time_ms
  [status, headers, response]
end