mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00
process: add direct access to rss without iterating pages
Accessing the rss value through memoryUsage() can be expensive because this method will also generate memory usage statistics by iterating on each page. This commit intend to offer a more direct access to rss value. Refs: #33384 PR-URL: https://github.com/nodejs/node/pull/34291 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
d548f4d116
commit
83ab5433ff
4 changed files with 41 additions and 1 deletions
|
@ -44,3 +44,5 @@ if (r.arrayBuffers > 0) {
|
|||
assert.strictEqual(after.arrayBuffers - r.arrayBuffers, size,
|
||||
`${after.arrayBuffers} - ${r.arrayBuffers} === ${size}`);
|
||||
}
|
||||
|
||||
assert(process.memoryUsage.rss() > 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue