Sha256: b7262b1eb635003c5567d7b301bed7385e3fcf0239cc7f93dbf2a8f1a17cb891
Contents?: true
Size: 699 Bytes
Versions: 52
Compression:
Stored size: 699 Bytes
Contents
# encoding: UTF-8 # # Copyright (c) 2010-2017 GoodData Corporation. All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. require 'benchmark' require_relative 'base_middleware' require 'pp' module GoodData module Bricks class BenchMiddleware < Bricks::Middleware 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 end end end
Version data entries
52 entries across 52 versions & 1 rubygems