diff --git a/doc/api/v8.md b/doc/api/v8.md index ab5950dda62c6a..f5d3bf41848287 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -166,6 +166,28 @@ being non-zero indicates a potential memory leak. } ``` +## v8.getHeapCodeStatistics() + + +* Returns: {Object} + +Returns an object with the following properties: + +* `code_and_metadata_size` {number} +* `bytecode_and_metadata_size` {number} +* `external_script_source_size` {number} + + +```js +{ + code_and_metadata_size: 212208, + bytecode_and_metadata_size: 161368, + external_script_source_size: 1410794 +} +``` + ## v8.setFlagsFromString(flags)