Skip to content

Commit a47764c

Browse files
committed
Use CallStack printer instead
This makes a flamegraph like colored call stack with percentages for each method call. It's much easier to see where the time is being spent than by using a text printer or graph printer.
1 parent 83b5b02 commit a47764c

8 files changed

+286525
-4
lines changed

graphs/rails4.2_controller_create_callstack.html

Lines changed: 6337 additions & 0 deletions
Large diffs are not rendered by default.

graphs/rails4.2_controller_create_flamegraph.html

Lines changed: 5750 additions & 0 deletions
Large diffs are not rendered by default.

graphs/rails4.2_controller_create_html_graph.html

Lines changed: 103751 additions & 0 deletions
Large diffs are not rendered by default.

graphs/rails4.2_integration_create_callstack.html

Lines changed: 10676 additions & 0 deletions
Large diffs are not rendered by default.

graphs/rails4.2_integration_create_html_graph.html

Lines changed: 154257 additions & 0 deletions
Large diffs are not rendered by default.

graphs/rails4.2_integration_crreate_flamegraph.html

Lines changed: 5750 additions & 0 deletions
Large diffs are not rendered by default.

test/controllers/documents_controller_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class DocumentsControllerTest < ActionController::TestCase
66
get :index
77
assert_equal 200, response.status
88
end
9-
printer = RubyProf::GraphHtmlPrinter.new(result)
9+
printer = RubyProf::CallStackPrinter.new(result)
1010
printer.print(STDOUT, {})
1111
end
1212

@@ -25,7 +25,7 @@ class DocumentsControllerTest < ActionController::TestCase
2525
assert_equal 'New things', document.title
2626
assert_equal 'Doing them', document.content
2727
end
28-
printer = RubyProf::GraphHtmlPrinter.new(result)
28+
printer = RubyProf::CallStackPrinter.new(result)
2929
printer.print(STDOUT, {})
3030
end
3131

test/controllers/documents_integration_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class DocumentsIntegrationTest < ActionDispatch::IntegrationTest
77
get '/documents'
88
assert_equal 200, response.status
99
end
10-
printer = RubyProf::GraphHtmlPrinter.new(result)
10+
printer = RubyProf::CallStackPrinter.new(result)
1111
printer.print(STDOUT, {})
1212
end
1313

@@ -26,7 +26,7 @@ class DocumentsIntegrationTest < ActionDispatch::IntegrationTest
2626
assert_equal 'New things', document.title
2727
assert_equal 'Doing them', document.content
2828
end
29-
printer = RubyProf::GraphHtmlPrinter.new(result)
29+
printer = RubyProf::CallStackPrinter.new(result)
3030
printer.print(STDOUT, {})
3131
end
3232

0 commit comments

Comments
 (0)