Class: Merb::Rack::Profiler

Inherits:
Middleware show all
Defined in:
lib/merb-core/rack/middleware/profiler.rb

Instance Method Summary collapse

Methods inherited from Middleware

#deferred?

Constructor Details

#initialize(app, min = 1, iter = 1) ⇒ Profiler

Returns a new instance of Profiler.



5
6
7
8
# File 'lib/merb-core/rack/middleware/profiler.rb', line 5

def initialize(app, min=1, iter=1)
  super(app)
  @min, @iter = min, iter
end

Instance Method Details

#call(env) ⇒ Object



10
11
12
13
14
# File 'lib/merb-core/rack/middleware/profiler.rb', line 10

def call(env)
  __profile__("profile_output", @min, @iter) do
    @app.call(env)
  end
end