@@ -10,7 +10,7 @@ class DocumentsIntegrationTest < ActionDispatch::IntegrationTest
1010 # ruby -I lib:test test/integration/documents_integration_test.rb -n test_index_rp
1111 test "index rp" do
1212 result = RubyProf . profile do
13- get '/documents'
13+ get documents_path
1414 assert_equal 200 , response . status
1515 end
1616 File . open ( 'graphs/rails_only/index_integration_callstack.html' , 'w' ) do |file |
@@ -22,6 +22,16 @@ class DocumentsIntegrationTest < ActionDispatch::IntegrationTest
2222 end
2323 end
2424
25+ # ruby -I lib:test test/integration/documents_integration_test.rb -n test_index_sp
26+ test "index sp" do
27+ StackProf . run ( mode : :cpu , out : 'graphs/rails_only/index_integration_stackprof.dump' ) do
28+ 3000 . times do
29+ get '/documents'
30+ assert_equal 200 , response . status
31+ end
32+ end
33+ end
34+
2535 # ruby -I lib:test test/integration/documents_integration_test.rb -n test_index_flame
2636 test "index flame" do
2737 Flamegraph . generate ( "graphs/rails_only/index_integration_flamegraph.html" ) do
@@ -57,6 +67,18 @@ class DocumentsIntegrationTest < ActionDispatch::IntegrationTest
5767 end
5868 end
5969
70+ # ruby -I lib:test test/integration/documents_integration_test.rb -n test_create_sp
71+ test "create sp" do
72+ StackProf . run ( mode : :cpu , out : 'graphs/rails_only/create_integration_stackprof.dump' ) do
73+ 3000 . times do
74+ post '/documents' , document : { title : "New things" , content : "Doing them" }
75+
76+ document = Document . last
77+ assert_equal 'New things' , document . title
78+ assert_equal 'Doing them' , document . content
79+ end
80+ end
81+ end
6082 # ruby -I lib:test test/integration/documents_integration_test.rb -n test_create_flame
6183 test "create flame" do
6284 Flamegraph . generate ( "graphs/rails_only/create_integration_flamegraph.html" ) do
0 commit comments