- 27 9月, 2014 1 次提交
-
-
由 Richard Schneeman 提交于
Right now BenchmarkCleaner allocates hundreds of strings on every request with an exception. This patch moves those strings to be generated at boot once and re-used. ## Bench Methods I took a modified form of CodeTriage https://github.com/schneems/codetriage-ko1-test-app/blob/master/perf.rake and ran given rake tasks with and without the patch to BacktraceCleaner. I made an endpoint results in exception ``` def index raise “foo" end ``` The gem `memory_profiler` was used to capture objects allocated for a single request. Then `benchmark/ips` was used to test the speed of the patch. You will see that we use less objects and the code becomes measurably faster with this patch. ## With patch: Memory for one request: ``` Total allocated 7441 Total retained 37 ``` Requests per second: ``` Calculating ------------------------------------- ips 4 i/100ms ------------------------------------------------- ips 43.0 (±4.7%) i/s - 216 in 5.037733s ``` ## Without patch: Memory used for one request: ``` Total allocated 11599 Total retained 35 ``` Requests per second: ``` Calculating ------------------------------------- ips 3 i/100ms ------------------------------------------------- ips 39.4 (±7.6%) i/s - 198 in 5.052783s ``` ## Analysis The patch is faster: ``` (43.0 - 39.4 ) / 39.4 * 100 # => 9 # % ~ speed bump ``` It also allocates less objects: ``` 11599 - 7441 # => 4158 ``` These strings are allocated on __EVERY SINGLE REQUEST__. This patch saves us 4158 objects __PER REQUEST__ with exception. Faster errors == Faster applications
-
- 22 9月, 2014 4 次提交
-
-
由 Matthew Draper 提交于
Fix false assertions in AR::TestCase::AttributeMethodsTest
-
由 Yuki Nishijima 提交于
This test has always been green because it uses "assert" and the first argument is an truthy class/object.
-
由 Godfrey Chan 提交于
Document that the default for `rails server -b` has changed
-
由 Godfrey Chan 提交于
Fixes #16578
-
- 21 9月, 2014 6 次提交
-
-
由 Yves Senn 提交于
Standardize on `Rails.application` [ci skip]
-
由 Zachary Scott 提交于
[ci skip] Fix typo in activerecord/test/cases/attribute_methods_test.rb:737
-
由 Yuki Nishijima 提交于
-
由 Zachary Scott 提交于
[ci skip] modify the description of production log level default
-
由 yuuji.yaginuma 提交于
-
由 Yves Senn 提交于
ActiveRecord CHANGELOG improvements [skip ci]
-
- 20 9月, 2014 8 次提交
-
-
由 Jon Atack 提交于
-
由 Godfrey Chan 提交于
The hash is now string-keyed, and [_]reflect_on_association calls `to_s` on the argument anyway.
-
由 Godfrey Chan 提交于
For now, we will just skip the cache when a non-column key is used in the hash. If the future, we can probably move some of the logic in PredicateBuilder.expand up the chain to make caching possible for association queries. Closes #16903 Fixes #16884
-
由 Godfrey Chan 提交于
This is pretty lame though, so feel free to send a PR with a better fix! ;) cc @zev @tenderlove
-
由 Aaron Patterson 提交于
Update RecordNotFound exception cases to include a message with the
-
由 Rafael Mendonça França 提交于
[ci skip] Reword a comment in concern's documentation
-
由 Genadi Samokovarov 提交于
Nothing biggie. Skimmed through `ActiveSupport::Concern` docs these days and this one comment seemed a bit off.
-
由 Tamir Duberstein 提交于
This seems to be the style settled on in most of the templates.
-
- 19 9月, 2014 9 次提交
-
-
由 Rafael Mendonça França 提交于
Updated comment about features of fixtures
-
由 Abdelkader Boudih 提交于
[ci skip] ActionRecord CHANGELOG docs fixes
-
由 Matthew Draper 提交于
Make delegation work with the reserved words passed to `:to`
-
由 lethalbrains 提交于
-
由 Prathamesh Sonpatki 提交于
- Added a note about some features which are not dependent on auto-generated ID's. - [ci skip]
-
由 Agis- 提交于
Fixes #16956.
-
由 Rafael Mendonça França 提交于
Specify dummy app's db migrate path in plugin's test_helper.rb Conflicts: railties/CHANGELOG.md
-
由 Xavier Noria 提交于
If code is not eager loaded constants are loaded on demand. Constant autoloading is not thread-safe, so if eager loading is not enabled multi-threading should not be allowed. This showed up in certain Capybara scenarios: Most Capybara drivers other than Rack::Test need a web server. In particular, drivers for JavaScript support. Capybara launches WEBrick in its own thread for those but that per se is fine, because the spec thread and the server thread are coordinated. Problem comes if the page being served in the spec makes Ajax calls. Those may hit WEBrick in parallel, and since WEBrick is multi-threaded and allow_concurrency? returns true in the test environment before this patch, threads are spawned to serve those parallel requests. On the other hand, since eager_load is false by default in the test environment, constants are not preloaded. So the suite is autoloading constants in a multi-threaded set. That's a receipt for paracetamol. The symptom is random obscure errors whose messages point somehow to constant autoloading. As a consequence of this fix for allow_concurrency? WEBrick in Capybara scenarios no longer runs in multi-threaded mode. Fixes #15089.
-
由 Rafael Mendonça França 提交于
Use #inject over #sum to build PG create DB statement
-
- 18 9月, 2014 12 次提交
-
-
由 Geoff Harcourt 提交于
While investigating #16951 I found that another library's monkey-patching of `Enumerable` was causing the test migrations helper to break when trying to build the `CREATE DATABASE` statement. The prior approach used `#sum` to build the string from the options hash. As the code that combines the options to build the database statement is not user-facing, using `#inject` here instead will remove the only place where the database creation/migration code is dependent on ActiveSupport's monkey-patching of `Enumerable`.
-
由 Abdelkader Boudih 提交于
[ci skip] ActionView and ActionMailerCHANGELOG docs fixes
-
由 Akshay Vishnoi 提交于
-
由 Rafael Mendonça França 提交于
[ci skip] ActiveModel CHANGELOG docs fixes
-
由 Akshay Vishnoi 提交于
-
由 Abdelkader Boudih 提交于
Grammar correction in ActiveSupport CHANGELOG [ci skip]
-
由 Akshay Vishnoi 提交于
-
由 Rafael Mendonça França 提交于
[ci skip] ActiveSupport CHANGELOG fixes
-
由 Akshay Vishnoi 提交于
1. spacing issues 2. spelling correction 3. grammar correction 4. Add missing docs
-
由 Abdelkader Boudih 提交于
Added Responders docs, made Web Console docs more consistent. [ci skip]
-
由 Rafael Mendonça França 提交于
[ci skip] AJ docs fixes
-
由 Akshay Vishnoi 提交于
1. Indentation 2. Spaces issues 3. Spelling correction 4. Grammar correction 5. Add #:nodoc: to all internal classes
-