Sha256: c554e7f6e5bcd3cc67c2967fd5c55d91b7ebbf14fb8e325ff3659146ef791288

Contents?: true

Size: 502 Bytes

Versions: 5

Compression:

Stored size: 502 Bytes

Contents

module Speedos
  class Performance
    def self.test(name="")
      Log.info("#{name} Test begins")
      page = Page.new
      page.new_har

      yield page if block_given?

      Log.info("#{name} Test Complete")
      success = true
    rescue Exception => e
      Log.error("#{e}")
      Log.error("#{e.backtrace}")
      success = false
    ensure
      Record.create(JSON.load(page.get_har.to_json).merge(success: success))
      page.server_proxy.close
      page.server.stop
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
speedos-0.0.11 lib/speedos/performance.rb
speedos-0.0.10 lib/speedos/performance.rb
speedos-0.0.9 lib/speedos/performance.rb
speedos-0.0.8 lib/speedos/performance.rb
speedos-0.0.7 lib/speedos/performance.rb