Repository navigation
Add option to collect memory information from processes - #11
Merged
Merged
Conversation
Daniel Imms (Tyriar)
suggested changes
Mar 15, 2018
| } | ||
|
|
||
| function getProcessTree(rootPid, callback) { | ||
| function getProcessTree(rootPid, callback, flags) { |
Contributor
There was a problem hiding this comment.
We'll need a corresponding change in the typings file
| return; | ||
| } | ||
|
|
||
| // Flags is an optional parameter. By default, all options for included process data are off. |
Contributor
There was a problem hiding this comment.
Let's make it a mandatory parameter in the C++ side and use flags || 0 on JS side to simplify things.
Rachel Macfarlane (RMacfarlane)
force-pushed
the
rmacfarlane/memory
branch
from
March 15, 2018 17:29
c2baa22 to
ef89a88
Compare
Daniel Imms (Tyriar)
suggested changes
Mar 15, 2018
| native.getProcessList((list) => { | ||
| assert.equal(list.some((p => p.memory !== 0)), true); | ||
| done(); | ||
| }, 1); |
Contributor
There was a problem hiding this comment.
Can we use the flags enum here?
Contributor
Author
There was a problem hiding this comment.
I don't think so, since this is a js file. I can make a separate change to move to using typescript
|
|
||
| // Memory should be a number when flag is set | ||
| native.getProcessList((list) => { | ||
| assert.equal(list.some((p => p.memory !== 0)), true); |
Contributor
There was a problem hiding this comment.
> 0 to be safer since !== 0 will be true when it's undefined.
| } | ||
|
|
||
| function get(rootPid: number, callback: (tree: ProcessTreeNode) => void): void; | ||
| function get(rootPid: number, callback: (tree: ProcessTreeNode) => void, flag?: ProcessDataFlag): void; |
Contributor
There was a problem hiding this comment.
Let's call this flags
Daniel Imms (Tyriar)
approved these changes
Mar 16, 2018
3 tasks done
Volodymyr M (vmihdal)
pushed a commit
to vmihdal/vscode-windows-process-tree
that referenced
this pull request
Aug 11, 2021
READY : Fixate node-pre-gyp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds optional flags parameter to control what information is fetched about a process. When memory bit is set, reports memory usage for each process in bytes.