Sha256: bd102b68904519f923854e1e1afa774a4898993910f6f8bf9679f9d9c37c59b5
Contents?: true
Size: 617 Bytes
Versions: 1
Compression:
Stored size: 617 Bytes
Contents
require "bundler/setup" Bundler.require(:default) require "minitest/autorun" require "minitest/pride" require "active_support" class Car def start(speed) sleep(1) end benchmark :start def boom(speed) sleep(1) end benchmark :boom #, payload: -> (speed) { speed * 10000000 } def self.boom2 sleep(1) end class << self benchmark :boom2 end end ActiveSupport::Notifications.subscribe "benchmark.benchmeth" do |*args| event = ActiveSupport::Notifications::Event.new(*args) puts "[AS] %s : %d ms" % [event.payload[:name], event.duration] end # Benchmeth.use_notifications = true
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
benchmeth-0.1.1 | test/test_helper.rb |