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

process: add _getActiveHandles documentation #37261

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yashLadha
Copy link
Contributor

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.

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem. labels Feb 7, 2021
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.
@yashLadha yashLadha force-pushed the handle_documentation branch from f4167fa to 053b900 Compare February 7, 2021 07:19
Copy link
Contributor

@mscdex mscdex left a 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.

RaisinTen added a commit to RaisinTen/node that referenced this pull request Feb 7, 2021
These are made public because it is useful to have as mentioned here:
nodejs#37261
RaisinTen added a commit to RaisinTen/node that referenced this pull request Feb 7, 2021
These are made public because of the reasons mentioned here:
nodejs#37261
@RaisinTen
Copy link
Contributor

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()`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
## `process._getActiveHandles()`
## `process.getActiveHandles()`


* Returns: {Array}

The `process.getActiveHandles` method returns the list of handles that are
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The `process.getActiveHandles` method returns the list of handles that are
The `process.getActiveHandles()` method returns the list of handles that are

Comment on lines +2580 to +2581
currently opened up by the process. These can be open file descriptors,
conenction, resources that are actively being held by the process.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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.

RaisinTen added a commit to RaisinTen/node that referenced this pull request Feb 7, 2021
These are made public because of the reasons mentioned here:
nodejs#37261
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants