Last active
August 29, 2015 14:03
-
-
Save tgxworld/30b10b6d62876f1b17e8 to your computer and use it in GitHub Desktop.
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 | |
Calculating ------------------------------------- | |
Integration Test 62 i/100ms | |
Functional Test 89 i/100ms | |
------------------------------------------------- | |
Integration Test 637.5 (±8.3%) i/s - 3224 in 5.097314s | |
Functional Test 886.5 (±5.5%) i/s - 4450 in 5.036131s | |
# without Turbolinks before/after filters | |
Calculating ------------------------------------- | |
Integration Test 71 i/100ms | |
Functional Test 90 i/100ms | |
------------------------------------------------- | |
Integration Test 733.7 (±7.5%) i/s - 3692 in 5.063477s | |
Functional Test 920.6 (±5.6%) i/s - 4590 in 5.003042s |
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://www.example.com/users" | |
assert_equal 200, response.status | |
end | |
end | |
class UserFlowTest2 < ActionController::TestCase | |
tests UsersController | |
def test_index | |
get :index | |
assert_equal 200, response.status | |
end | |
end | |
Benchmark.ips(5) do |bm| | |
bm.report 'Integration Test' do | |
Minitest.run_one_method(UserFlowTest, 'test_index') | |
end | |
bm.report 'Functional Test' do | |
Minitest.run_one_method(UserFlowTest2, 'test_index') | |
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
class UsersController < ApplicationController | |
before_action :set_user, only: [:show, :edit, :update, :destroy] | |
# GET /users | |
# GET /users.json | |
def index | |
render plain: 'ok' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment