Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rdp/ruby-prof
Browse files Browse the repository at this point in the history
Conflicts:
	bin/ruby-prof
  • Loading branch information
Charlie Savage committed Jan 5, 2013
2 parents 22d4cfb + e998b32 commit 6adca02
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
28 changes: 14 additions & 14 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -186,29 +186,29 @@ profile.rb.
So to profile Rails:

1. Create a new profile.rb environment. Make sure to turn on cache_classes
and cache_template_loading. Otherwise your profiling results will be
overwhelemed by the time Rails spends loading required files. You should
likely turn off caching.
and cache_template_loading. Otherwise your profiling results will be
overwhelemed by the time Rails spends loading required files. You should
likely turn off caching.

2. Add the ruby-prof to your gemfile:

group :profile do
gem 'ruby-prof'
end
group :profile do
gem 'ruby-prof'
end

3. Add the ruby prof rack adapter to your middleware stack. One way to
do this is by adding the following code to config.ru:
do this is by adding the following code to config.ru:

if Rails.env.profile?
use Rack::RubyProf, :path => '/temp/profile'
end
if Rails.env.profile?
use Rack::RubyProf, :path => '/temp/profile'
end

The path is where you want profiling results to be stored. By default the
rack adapter will generate a html call graph report and flat text report.
The path is where you want profiling results to be stored. By default the
rack adapter will generate a html call graph report and flat text report.

4. Now make a request to your running server. New profiling information will
be generated for each request. Note that each request will overwrite
the profiling reports created by the previous request!
be generated for each request. Note that each request will overwrite
the profiling reports created by the previous request!

== Reports

Expand Down
Empty file modified bin/ruby-prof
100755 → 100644
Empty file.
6 changes: 3 additions & 3 deletions test/dynamic_method_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def test_dynamic_method
assert_in_delta(0.0, methods[5].self_time, 0.01)

assert_equal("#{RubyProf::PARENT}#initialize", methods[6].full_name)
assert_in_delta(0.0, methods[5].total_time, 0.01)
assert_in_delta(0.0, methods[5].wait_time, 0.01)
assert_in_delta(0.0, methods[5].self_time, 0.01)
assert_in_delta(0.0, methods[6].total_time, 0.01)
assert_in_delta(0.0, methods[6].wait_time, 0.01)
assert_in_delta(0.0, methods[6].self_time, 0.01)
end
end
1 change: 0 additions & 1 deletion test/test_suite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
module_test
multi_printer_test
no_method_class_test
pause_resume_test
prime_test
printers_test
recursive_test
Expand Down

0 comments on commit 6adca02

Please sign in to comment.