This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# profile_test.rb | |
require 'abstract_unit' | |
require 'benchmark' | |
require 'benchmark/ips' | |
require 'ruby-prof' | |
class AController < ActionController::Base | |
def index | |
render html: 'ok' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'abstract_unit' | |
require 'benchmark' | |
require 'benchmark/ips' | |
require 'ruby-prof' | |
class AController < ActionController::Base | |
def index | |
render html: 'ok' | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'abstract_unit' | |
require 'benchmark/ips' | |
require 'ruby-prof' | |
class AController < ActionController::Base | |
def index | |
render html: 'ok' | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'abstract_unit' | |
require 'benchmark/ips' | |
require 'ruby-prof' | |
class AController < ActionController::Base | |
def index | |
render html: 'ok' | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
require 'benchmark/ips' | |
class UserFlowTest < ActionDispatch::IntegrationTest | |
def test_index | |
get 'http://example.com/users' | |
assert_equal 200, response.status | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Listing users</h1> | |
<table> | |
<thead> | |
<tr> | |
<th colspan="3"></th> | |
</tr> | |
</thead> | |
<tbody> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Calculated based on 400 requests. | |
ActionDispatch::Routing::RouteSet | |
sum: 3.1608972460000047 mean: 0.0019755607787500028 median: 0.001745662. | |
Rack::ETag | |
sum: 0.06956181100000014 mean: 4.3476131875000085e-05 median: 3.7703499999999996e-05. | |
Rack::ConditionalGet | |
sum: 0.055353544999999955 mean: 3.4595965624999973e-05 median: 2.8501500000000174e-05. | |
Rack::Head | |
sum: 0.022108525999999972 mean: 1.3817828749999982e-05 median: 1.1781000000000096e-05. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Before https://github.com/rails/rails/commit/4fd144dd4bb0e1ede5a4857c178138088353a3d1 on May 13 | |
Calculating ------------------------------------- | |
Integration Test 58 i/100ms | |
Functional Test 87 i/100ms | |
------------------------------------------------- | |
Integration Test 605.9 (±9.7%) i/s - 3016 in 5.030043s | |
Functional Test 877.5 (±11.4%) i/s - 4350 in 5.030839s | |
# with Turbolinks before/after filter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Before: Subscribing and unsubscribing to `/render_template.action_view/` every test. | |
Calculating ------------------------------------- | |
Integration Test 67 i/100ms | |
Functional Test 91 i/100ms | |
------------------------------------------------- | |
Integration Test 691.5 (±6.9%) i/s - 3484 in 5.063611s | |
Functional Test 938.4 (±5.4%) i/s - 4732 in 5.058631s | |
# After: Subscribing to `/render_template.actione_view/` only once. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Before https://github.com/rails/rails/commit/4fd144dd4bb0e1ede5a4857c178138088353a3d1 on May 13 | |
Calculating ------------------------------------- | |
Integration Test 59 i/100ms | |
Functional Test 84 i/100ms | |
------------------------------------------------- | |
Integration Test 599.5 (±11.0%) i/s - 3009 in 5.087300s | |
Functional Test 882.1 (±10.2%) i/s - 4368 in 5.008871s | |
# Benchmark as of July 8 |
OlderNewer