Add benchmark method that can be called from anywhere
This commit is contained in:
parent
9b6008924d
commit
1911673e67
|
@ -1,3 +1,15 @@
|
|||
* Add benchmark method that can be called from anywhere.
|
||||
|
||||
This method is used as a quick way to measure & log the speed of some code.
|
||||
However, it was previously available only in specific contexts, mainly views and controllers.
|
||||
The new Rails.benchmark can be used in the rest of your app: services, API wrappers, models, etc.
|
||||
|
||||
def test
|
||||
Rails.benchmark("test") { ... }
|
||||
end
|
||||
|
||||
*Simon Perepelitsa*
|
||||
|
||||
* Removed manifest.js and application.css in app/assets
|
||||
folder when --skip-sprockets option passed as flag to rails.
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ end
|
|||
|
||||
module Rails
|
||||
extend ActiveSupport::Autoload
|
||||
extend ActiveSupport::Benchmarkable
|
||||
|
||||
autoload :Info
|
||||
autoload :InfoController
|
||||
|
|
Loading…
Reference in New Issue