Skip to content

Instantly share code, notes, and snippets.

View nandilugio's full-sized avatar
🤖
Having state

Fernando Stecconi nandilugio

🤖
Having state
View GitHub Profile
require 'active_support/core_ext/module'
require 'active_support/core_ext/benchmark'
Object.singleton_class.class_eval do
def profile_methods(*names)
names.each do |name|
case name
when Regexp
profiling_methods.grep(name).each { |match| profile_method(match) }
else