diff options
author | theanarkh <2923878201@qq.com> | 2022-04-23 18:35:36 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2022-04-28 07:57:22 +0300 |
commit | a19fb609d8ef168c2b7606123d72f2bc331bdec1 (patch) | |
tree | 394c04afbac76b25ebf54ed7deaad382e45fb68d /lib | |
parent | b0f7c4c8f928597f2118dde73c98ac0fba8f01f9 (diff) |
v8: export more fields in getHeapStatistics
export total_global_handles_size, used_global_handles_size,
external_memory in getHeapStatistics
PR-URL: https://github.com/nodejs/node/pull/42784
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/v8.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/v8.js b/lib/v8.js index 75981152851..e899da46849 100644 --- a/lib/v8.js +++ b/lib/v8.js @@ -107,6 +107,9 @@ const { kPeakMallocedMemoryIndex, kNumberOfNativeContextsIndex, kNumberOfDetachedContextsIndex, + kTotalGlobalHandlesSizeIndex, + kUsedGlobalHandlesSizeIndex, + kExternalMemoryIndex, // Properties for heap spaces statistics buffer extraction. kHeapSpaces, @@ -165,7 +168,10 @@ function getHeapStatistics() { peak_malloced_memory: buffer[kPeakMallocedMemoryIndex], does_zap_garbage: buffer[kDoesZapGarbageIndex], number_of_native_contexts: buffer[kNumberOfNativeContextsIndex], - number_of_detached_contexts: buffer[kNumberOfDetachedContextsIndex] + number_of_detached_contexts: buffer[kNumberOfDetachedContextsIndex], + total_global_handles_size: buffer[kTotalGlobalHandlesSizeIndex], + used_global_handles_size: buffer[kUsedGlobalHandlesSizeIndex], + external_memory: buffer[kExternalMemoryIndex] }; } |