-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Conversation
ebb7dec
to
2e433da
Compare
@@ -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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'm not sure that that test in smartos fail it's related with the change, but there's any way to be sure? |
Not related to this change :) |
c133999
to
83c7a88
Compare
Landed in cb45374 |
Checklist
Description of change
Ref: #8913