Sha256: 64cf31bd4d4b3ad129af11596374bc120034ffd59122dd9ac418d9d4b6012052

Contents?: true

Size: 370 Bytes

Versions: 1

Compression:

Stored size: 370 Bytes

Contents

require 'benchmark'
require File.join(File.dirname(__FILE__), "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.pre11 lib/gooddata/bricks/middleware/bench_middleware.rb