Class: GoodData::Bricks::BenchMiddleware
- Inherits:
-
Middleware
- Object
- Middleware
- GoodData::Bricks::BenchMiddleware
- Defined in:
- lib/gooddata/bricks/middleware/bench_middleware.rb
Instance Attribute Summary
Attributes inherited from Middleware
Instance Method Summary collapse
Methods inherited from Middleware
Methods included from Utils
Constructor Details
This class inherits a constructor from GoodData::Bricks::Middleware
Instance Method Details
permalink #call(params) ⇒ Object
[View source]
14 15 16 17 18 19 20 21 22 |
# File 'lib/gooddata/bricks/middleware/bench_middleware.rb', line 14 def call(params) params = params.to_hash GoodData.logger.info('Starting timer') result = nil report = Benchmark.measure { result = @app.call(params) } GoodData.logger.info('Stopping timer') GoodData.logger.info(report.pretty_inspect) result end |