Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ruby-prof - David Grayson
Search
Las Vegas Ruby Group
February 06, 2012
0
49
ruby-prof - David Grayson
Las Vegas Ruby Group
February 06, 2012
Tweet
Share
More Decks by Las Vegas Ruby Group
See All by Las Vegas Ruby Group
Ruby ISO Standard - David Grayson
lvrug
0
92
Windows Automation - Howard Feldman
lvrug
0
37
Separating Your Application from Rails - Brian Hughes
lvrug
0
70
SWIG and Ruby - David Grayson
lvrug
0
39
Practical Object-Oriented Design in Ruby - Charles Jackson
lvrug
3
96
The Hamster Gem - Ryan Mulligan
lvrug
1
70
Varnish+Redis - Russ Smith
lvrug
1
73
Lambdas and Pops - Jan Hettich
lvrug
0
38
Making Good Use of Fonts - Russ Smith
lvrug
1
53
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
27
6.3k
The Art of Programming - Codeland 2020
erikaheidi
41
12k
Fashionably flexible responsive web design (full day workshop)
malarkey
397
65k
What's in a price? How to price your products and services
michaelherold
237
11k
Become a Pro
speakerdeck
PRO
9
4.5k
Bash Introduction
62gerente
604
210k
Docker and Python
trallard
33
2.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
272
13k
Bootstrapping a Software Product
garrettdimon
PRO
301
110k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
240
1.2M
No one is an island. Learnings from fostering a developers community.
thoeni
14
2.1k
Into the Great Unknown - MozCon
thekraken
10
980
Transcript
ruby-prof David Grayson Las Vegas Ruby Meetup 2012-02-06
None
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
Example profiles
ruby-prof executable ruby-prof --file=profile.html \ --printer=graph_html \ slow_program.rb ruby-prof slow_program.rb
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