track_method¶ ↑
Tracks how long a method takes, and logs with color highlighting expensive method calls.
Contributing to track_method¶ ↑
require 'rubygems' require 'track_method' class Foo def bar(x, y, z) sleep [0.2, 0.1, 0.0, 1.5, 0.4].shuffle.first end end Foo.track_method :bar 10.times { Foo.new.bar(1, 2, 3) }