Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add allocations to template renderer subscription #34136

Merged
merged 1 commit into from Oct 10, 2018

Conversation

Projects
None yet
2 participants
@eileencodes
Copy link
Member

eileencodes commented Oct 9, 2018

This PR adds the allocations to the instrumentation for template and
partial rendering.

Before:

  Rendering posts/new.html.erb within layouts/application
  Rendered posts/_form.html.erb (9.7ms)
  Rendered posts/new.html.erb within layouts/application (10.9ms)
Completed 200 OK in 902ms (Views: 890.8ms | ActiveRecord: 0.8ms)

After:

  Rendering posts/new.html.erb within layouts/application
  Rendered posts/_form.html.erb (Duration: 7.1ms | Allocations: 6004)
  Rendered posts/new.html.erb within layouts/application (Duration: 8.3ms | Allocations: 6654)
Completed 200 OK in 858ms (Views: 848.4ms | ActiveRecord: 0.4ms | Allocations: 1539564)

cc/ @tenderlove

@eileencodes eileencodes added this to the 6.0.0 milestone Oct 9, 2018

@rails-bot rails-bot bot added the actionpack label Oct 9, 2018

@eileencodes eileencodes force-pushed the add-allocations-to-template-renderer branch from 69a33bc to 0571e18 Oct 9, 2018

@albertoalmagro
Copy link
Contributor

albertoalmagro left a comment

Wow thanks @eileencodes! I just added a nitpicky comment 🔍

@@ -20,12 +20,15 @@ def process_action(event)
info do
payload = event.payload
additions = ActionController::Base.log_process_action(payload)

status = payload[:status]

This comment has been minimized.

@albertoalmagro

albertoalmagro Oct 9, 2018

Contributor

Nitpick: After removing the blank line I would format status to the same level asadditions as we seem to follow that style across this file.

payload   = event.payload
additions = ActionController::Base.log_process_action(payload)
status    = payload[:status]

This comment has been minimized.

@eileencodes

eileencodes Oct 10, 2018

Author Member

I went the other way. Evening the space makes searching harder so I'm not a huge fan.

This comment has been minimized.

@albertoalmagro

albertoalmagro Oct 10, 2018

Contributor

Great! Thanks for caring about this and for the PR ❤️

Add allocations to template renderer subscription
This PR adds the allocations to the instrumentation for template and
partial rendering.

Before:

```
  Rendering posts/new.html.erb within layouts/application
  Rendered posts/_form.html.erb (9.7ms)
  Rendered posts/new.html.erb within layouts/application (10.9ms)
Completed 200 OK in 902ms (Views: 890.8ms | ActiveRecord: 0.8ms)
```

After:

```
  Rendering posts/new.html.erb within layouts/application
  Rendered posts/_form.html.erb (Duration: 7.1ms | Allocations: 6004)
  Rendered posts/new.html.erb within layouts/application (Duration: 8.3ms | Allocations: 6654)
Completed 200 OK in 858ms (Views: 848.4ms | ActiveRecord: 0.4ms | Allocations: 1539564)
```

@eileencodes eileencodes force-pushed the add-allocations-to-template-renderer branch from 0571e18 to e8c1be4 Oct 10, 2018

@eileencodes eileencodes merged commit 8ecb75e into master Oct 10, 2018

3 checks passed

codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@eileencodes eileencodes deleted the add-allocations-to-template-renderer branch Oct 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.