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 (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.(1, 2, 3) }
Result
-
Copyright
Copyright © 2012 kazuyoshi tlacaelel. See LICENSE.txt for further details.