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

http: name anonymous functions #9054

Closed
wants to merge 1 commit into from

Conversation

maasencioh
Copy link
Contributor

Checklist
  • commit message follows commit guidelines
Description of change

Ref: #8913

@nodejs-github-bot nodejs-github-bot added the http Issues or PRs related to the http subsystem. label Oct 12, 2016
@maasencioh maasencioh changed the title http_agent: name anonymous functions http: name anonymous functions Oct 12, 2016
@@ -91,7 +91,7 @@ Agent.defaultMaxSockets = Infinity;
Agent.prototype.createConnection = net.createConnection;

// Get the key for a given set of request options
Agent.prototype.getName = function(options) {
Agent.prototype.getName = function getName(options) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Raynos is this good enough or would something like getAgentName be better?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally in flamegraphs you see fileName & function name, the two together help a bunch.

In a heapsnapshot you only see function name, however a heap snapshot does show whom holds a reference to the function, if a function is referenced from a class then that anchor point makes it easy to find.

I think having any kind of name at all is great. Having a unique name like Agent_getName does improve it slightly but that might get really annoying for coding style / redundency.

Copy link
Member

@lpinca lpinca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lpinca
Copy link
Member

lpinca commented Oct 17, 2016

@maasencioh
Copy link
Contributor Author

I'm not sure that that test in smartos fail it's related with the change, but there's any way to be sure?

@lpinca
Copy link
Member

lpinca commented Oct 17, 2016

not ok 138 parallel/test-async-wrap-check-providers
# TIMEOUT

Not related to this change :)

@rvagg rvagg force-pushed the master branch 2 times, most recently from c133999 to 83c7a88 Compare October 18, 2016 17:02
@jasnell jasnell self-assigned this Oct 18, 2016
jasnell pushed a commit that referenced this pull request Oct 18, 2016
Ref: #8913
PR-URL: #9054
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell
Copy link
Member

jasnell commented Oct 18, 2016

Landed in cb45374

@jasnell jasnell closed this Oct 18, 2016
jasnell pushed a commit that referenced this pull request Oct 18, 2016
Ref: #8913
PR-URL: #9054
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@maasencioh maasencioh deleted the name_http_agent branch October 18, 2016 23:46
jasnell pushed a commit that referenced this pull request Oct 19, 2016
Ref: #8913
PR-URL: #9054
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins added the baking-for-lts PRs that need to wait before landing in a LTS release. label May 9, 2017
@MylesBorins MylesBorins added dont-land-on-v6.x and removed baking-for-lts PRs that need to wait before landing in a LTS release. lts-watch-v6.x labels Nov 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http Issues or PRs related to the http subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants