This file contains hidden or 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
| # Using sprockets 3.6.0 with spocket-rails 3.0.4 | |
| # 171 - 177 MB of memory used booting rails before | |
| 11:24:33 ~/Code/manageiq (master) (2.2.5) + RAILS_ENV=production bin/rails r 'top = `/usr/bin/top -l 1 -pid #{Process.pid} | grep -E "ruby.+M"`; memory = top.split[7].to_i; puts memory' | |
| 177 | |
| 11:24:43 ~/Code/manageiq (master) (2.2.5) + RAILS_ENV=production bin/rails r 'top = `/usr/bin/top -l 1 -pid #{Process.pid} | grep -E "ruby.+M"`; memory = top.split[7].to_i; puts memory' | |
| 171 | |
| 11:25:31 ~/Code/manageiq (master) (2.2.5) + RAILS_ENV=production bin/rails r 'top = `/usr/bin/top -l 1 -pid #{Process.pid} | grep -E "ruby.+M"`; memory = top.split[7].to_i; puts memory' | |
| 177 |
This file contains hidden or 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
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'rails', '5.0.0.rc1' |
This file contains hidden or 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 'cases/helper' | |
| require 'models/parrot' | |
| # create_table :parrots, force: true do |t| | |
| # t.column :name, :string | |
| # t.column :color, :string | |
| # t.column :parrot_sti_class, :string | |
| # t.column :killer_id, :integer | |
| # if subsecond_precision_supported? | |
| # t.column :created_at, :datetime, precision: 0 |
This file contains hidden or 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
| I have a belief that code duplication, while a useful metric, is often done | |
| because of code complexity. In other words, complicated code is more likely to | |
| be duplicated. It doesn't mean that simple code can't be duplicated but that | |
| it's less likely and less of a problem. Along with this thinking, I'm asserting | |
| that if you limit complexity increase spikes, you will slowly remove duplication | |
| with it. Therefore, it might be less useful to target duplication except as a | |
| way to measure the impact of decreased complexity on duplication. | |
| With a large legacy codebase, it's nearly impossible to remove all complexity. | |
| One, it takes many resources many hours/days/weeks/months to do this. Two, you'd |
This file contains hidden or 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
| m: 1,250,309 | c: 24,829 | String /Users/joerafaniello/.gem/ruby/2.2.4/bundler/gems/rails-044e35f87379/activesupport/lib/active_support/dependencies.rb:293 | |
| m: 1,418,546 | c: 20,182 | String poparser.ry:139 | |
| m: 1,261,765 | c: 20,182 | String poparser.ry:219 | |
| m: 805,240 | c: 20,131 | ActionDispatch::Journey::Nodes::Cat /Users/joerafaniello/.gem/ruby/2.2.4/bundler/gems/rails-044e35f87379/actionpack/lib/action_dispatch/journey/parser.rb:137 | |
| m: 550,080 | c: 13,752 | String /Users/joerafaniello/.gem/ruby/2.2.4/bundler/gems/rails-044e35f87379/activesupport/lib/active_support/core_ext/numeric/conversions.rb:126 | |
| m: 550,040 | c: 13,751 | Hash /Users/joerafaniello/.gem/ruby/2.2.4/bundler/gems/rails-044e35f87379/activesupport/lib/active_support/core_ext/numeric/conversions.rb:105 | |
| m: 13,509,240 | c: 10,946 | RubyVM::InstructionSequence /Users/joerafaniello/.gem/ruby/2.2.4/bundler/gems/rails-044e35f87379/activesupport/lib/active_support/dependencies.rb:293 | |
| m: 347,120 | c: 8,678 | Array /Users/ |
This file contains hidden or 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
| 11:38:58 ~/Code/manageiq (remove_connection_specification_name_rails_5_workaround) (2.2.4) + be rails c | |
| ** Using session_store: ActionDispatch::Session::MemCacheStore | |
| DEPRECATION WARNING: You didn't set `secret_key_base`. Read the upgrade documentation to learn more about this new config option. (called from validate_secret_key_config! at /Users/joerafaniello/.gem/ruby/2.2.4/gems/railties-5.0.0.rc1/lib/rails/application.rb:509) | |
| Loading development environment (Rails 5.0.0.rc1) | |
| irb(main):001:0> | |
| irb(main):002:0* | |
| irb(main):003:0* | |
| irb(main):004:0* | |
| irb(main):005:0* MiqRegionRemote.connection_handler.connection_pool_list.collect {|pool| pool.spec.name} | |
| => ["primary"] |
This file contains hidden or 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
| diff --git a/activerecord/test/cases/connection_adapters/connection_handler_test.rb b/activerecord/test/cases/connection_adapters/connection_handler_test.rb | |
| index fc5ca88..d171ea7 100644 | |
| --- a/activerecord/test/cases/connection_adapters/connection_handler_test.rb | |
| +++ b/activerecord/test/cases/connection_adapters/connection_handler_test.rb | |
| @@ -21,6 +21,34 @@ def test_establish_connection_uses_spec_name | |
| @handler.remove_connection('readonly') | |
| end | |
| + def test_a_class_using_custom_pool_and_switching_back_to_primary | |
| + klass2 = Class.new(Base) { def self.name; 'klass2'; end } |
This file contains hidden or 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
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| # gem 'rails', '~>4.2.0' |
This file contains hidden or 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
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'rails', '~>4.2.0' |
This file contains hidden or 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
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| # gem 'sqlite3' |