Skip to content

Instantly share code, notes, and snippets.

@methodmissing
Created March 28, 2009 18:06
Show Gist options
  • Select an option

  • Save methodmissing/87160 to your computer and use it in GitHub Desktop.

Select an option

Save methodmissing/87160 to your computer and use it in GitHub Desktop.
2279161: cache cleared :13 Module#extend_object
2279161: cache cleared :13 Module#extend_object
2279161: c-return :13 Module#extend_object
2279161: c-call :13 Module#extended
2279161: c-return :13 Module#extended
2279161: c-return :13 Kernel#extend
2279161: return :14 Post#initialize
2279161: c-return :27 Class#new
2279161: call : 3 SpecialPost#save
2279161: line : 4 SpecialPost#save
2279161: c-call : 4 Kernel#puts
2279161: c-call : 4 IO#write
special2279161: c-return : 4 IO#write
2279161: c-call : 4 IO#write
2279161: c-return : 4 IO#write
2279161: c-return : 4 Kernel#puts
2279161: line : 5 SpecialPost#save
2279161: call :16 Post#save
2279161: line :17 Post#save
2279161: c-call :17 Kernel#puts
2279161: c-call :17 IO#write
save !2279161: c-return :17 IO#write
2279161: c-call :17 IO#write
2279161: c-return :17 IO#write
2279161: c-return :17 Kernel#puts
2279161: return :18 Post#save
2279161: return : 4 SpecialPost#save
module SpecialPost
def save
puts "special"
super
end
end
class Post
def initialize
extend SpecialPost
end
def save
puts "save !"
end
end
puts "* without instrumentation"
Post.new.save
puts "* with instrumentation"
Instrument.cache do
Post.new.save
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment