ruby-prof - David Grayson

B044a0f039af800f4df09bf3b2465f18?s=47 Las Vegas Ruby Group
February 06, 2012
36

ruby-prof - David Grayson

B044a0f039af800f4df09bf3b2465f18?s=128

Las Vegas Ruby Group

February 06, 2012
Tweet

Transcript

  1. ruby-prof David Grayson Las Vegas Ruby Meetup 2012-02-06

  2. None
  3. Features of ruby-prof  Speed  Can measure:  call

    times  memory usage  object allocations  Text and cross-referenced html reports:  Flat profiles  Graph profiles  Call tree profiles for KCacheGrind  Supports multiple threads
  4. Example profiles

  5. ruby-prof executable ruby-prof --file=profile.html \ --printer=graph_html \ slow_program.rb ruby-prof slow_program.rb

  6. ruby-prof API require 'ruby-prof' RubyProf.start slow_code result = RubyProf.stop File.open("slow2.txt","w")

    do |file| RubyProf::GraphPrinter.new(result).print(file) end