-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
process: add _getActiveHandles documentation #37261
base: main
Are you sure you want to change the base?
Conversation
Documenting activeHandles documentation in the process API which can be used by the developers to make functions/modules to track the health of their node process.
f4167fa
to
053b900
Compare
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.
I think we should instead strive to either remove the "private" underscore prefix or come up with an alternative public API that achieves the same goal. We should not make a habit of documenting private properties/methods, no matter how useful they might seem.
These are made public because it is useful to have as mentioned here: nodejs#37261
These are made public because of the reasons mentioned here: nodejs#37261
PR to make it public: #37262 |
@@ -2569,6 +2569,17 @@ process has been running. | |||
The return value includes fractions of a second. Use `Math.floor()` to get whole | |||
seconds. | |||
|
|||
## `process._getActiveHandles()` |
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.
## `process._getActiveHandles()` | |
## `process.getActiveHandles()` |
|
||
* Returns: {Array} | ||
|
||
The `process.getActiveHandles` method returns the list of handles that are |
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.
The `process.getActiveHandles` method returns the list of handles that are | |
The `process.getActiveHandles()` method returns the list of handles that are |
currently opened up by the process. These can be open file descriptors, | ||
conenction, resources that are actively being held by the process. |
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.
currently opened up by the process. These can be open file descriptors, | |
conenction, resources that are actively being held by the process. | |
currently acquired by the process. These can be open file descriptors, | |
connections, and resources. |
These are made public because of the reasons mentioned here: nodejs#37261
Documenting activeHandles documentation in the process API which can be
used by the developers to make functions/modules to track the health of
their node process.
Though i am aware of the reason that why it is not documented yet, even though being very
much helpful for instrumentation of process stats. I might be lacking some
information around the context but wanted to float this PR so that iteration can
be done on this PR and developers are aware of this awesome function.