diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2018-10-10 09:31:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-10 09:31:31 -0400 |
commit | 8ecb75e40510dd79cef173326a67fe93b274b2b7 (patch) | |
tree | 1d160425c9f10f382071b47b72cf2d30acaa60b7 /actionview/lib | |
parent | a52c6989a0aacc50b35891265a0b5631e1ec2370 (diff) | |
parent | e8c1be4ae7797f3ede588d2cf04a0155b4d6ce4a (diff) | |
download | rails-8ecb75e40510dd79cef173326a67fe93b274b2b7.tar.gz rails-8ecb75e40510dd79cef173326a67fe93b274b2b7.tar.bz2 rails-8ecb75e40510dd79cef173326a67fe93b274b2b7.zip |
Merge pull request #34136 from rails/add-allocations-to-template-renderer
Add allocations to template renderer subscription
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/log_subscriber.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionview/lib/action_view/log_subscriber.rb b/actionview/lib/action_view/log_subscriber.rb index db07b9d7fb..227f025385 100644 --- a/actionview/lib/action_view/log_subscriber.rb +++ b/actionview/lib/action_view/log_subscriber.rb @@ -18,7 +18,7 @@ module ActionView info do message = +" Rendered #{from_rails_root(event.payload[:identifier])}" message << " within #{from_rails_root(event.payload[:layout])}" if event.payload[:layout] - message << " (#{event.duration.round(1)}ms)" + message << " (Duration: #{event.duration.round(1)}ms | Allocations: #{event.allocations})" end end @@ -26,7 +26,7 @@ module ActionView info do message = +" Rendered #{from_rails_root(event.payload[:identifier])}" message << " within #{from_rails_root(event.payload[:layout])}" if event.payload[:layout] - message << " (#{event.duration.round(1)}ms)" + message << " (Duration: #{event.duration.round(1)}ms | Allocations: #{event.allocations})" message << " #{cache_message(event.payload)}" unless event.payload[:cache_hit].nil? message end @@ -37,7 +37,7 @@ module ActionView info do " Rendered collection of #{from_rails_root(identifier)}" \ - " #{render_count(event.payload)} (#{event.duration.round(1)}ms)" + " #{render_count(event.payload)} (Duration: #{event.duration.round(1)}ms | Allocations: #{event.allocations})" end end |