Sha256: 0af8c6e6a594c7deb78a6c4191372584754abb7c6a57484e1ede595872a3b1db

Contents?: true

Size: 360 Bytes

Versions: 1

Compression:

Stored size: 360 Bytes

Contents

# encoding: UTF-8

require 'benchmark'
require_relative 'base_middleware'

module GoodData::Bricks
  class BenchMiddleware < GoodData::Bricks::Middleware
    def call(params)
      puts 'Starting timer'
      result = nil
      report = Benchmark.measure { result = @app.call(params) }
      puts 'Stopping timer'
      pp report
      result
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gooddata-0.6.0 lib/gooddata/bricks/middleware/bench_middleware.rb