@@ -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_path
13+ get '/documents'
1414 assert_equal 200 , response . status
1515 end
1616 File . open ( 'graphs/rails_only/index_integration_callstack.html' , 'w' ) do |file |
@@ -22,9 +22,19 @@ 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
25+ # ruby -I lib:test test/integration/documents_integration_test.rb -n test_index_sp_cpu
26+ test "index sp cpu" do
27+ StackProf . run ( mode : :cpu , out : 'graphs/rails_only/index_integration_stackprof_cpu.dump' ) do
28+ 3000 . times do
29+ get '/documents'
30+ assert_equal 200 , response . status
31+ end
32+ end
33+ end
34+
35+ # ruby -I lib:test test/integration/documents_integration_test.rb -n test_index_sp_wall
36+ test "index sp wall" do
37+ StackProf . run ( mode : :wall , out : 'graphs/rails_only/index_integration_stackprof_wall.dump' ) do
2838 3000 . times do
2939 get '/documents'
3040 assert_equal 200 , response . status
@@ -67,9 +77,9 @@ class DocumentsIntegrationTest < ActionDispatch::IntegrationTest
6777 end
6878 end
6979
70- # ruby -I lib:test test/integration/documents_integration_test.rb -n test_create_sp
80+ # ruby -I lib:test test/integration/documents_integration_test.rb -n test_create_sp_cpu
7181 test "create sp" do
72- StackProf . run ( mode : :cpu , out : 'graphs/rails_only/create_integration_stackprof .dump' ) do
82+ StackProf . run ( mode : :cpu , out : 'graphs/rails_only/create_integration_stackprof_cpu .dump' ) do
7383 3000 . times do
7484 post '/documents' , document : { title : "New things" , content : "Doing them" }
7585
@@ -79,6 +89,20 @@ class DocumentsIntegrationTest < ActionDispatch::IntegrationTest
7989 end
8090 end
8191 end
92+
93+ # ruby -I lib:test test/integration/documents_integration_test.rb -n test_create_sp_wall
94+ test "create sp wall" do
95+ StackProf . run ( mode : :wall , out : 'graphs/rails_only/create_integration_stackprof_wall.dump' ) do
96+ 3000 . times do
97+ post '/documents' , document : { title : "New things" , content : "Doing them" }
98+
99+ document = Document . last
100+ assert_equal 'New things' , document . title
101+ assert_equal 'Doing them' , document . content
102+ end
103+ end
104+ end
105+
82106 # ruby -I lib:test test/integration/documents_integration_test.rb -n test_create_flame
83107 test "create flame" do
84108 Flamegraph . generate ( "graphs/rails_only/create_integration_flamegraph.html" ) do
0 commit comments