diff --git a/doc/api/v8.md b/doc/api/v8.md index 41e4c7456284ca..cdba51d8ddb88d 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -223,6 +223,19 @@ v8.setFlagsFromString('--trace_gc'); setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3); ``` +## `v8.stopCoverage()` + + + +The `v8.stopCoverage()` method allows the user to stop the coverage collection +started by [`NODE_V8_COVERAGE`][], so that V8 can release the execution count +records and optimize code. This can be used in conjunction with +[`v8.takeCoverage()`][] if the user wants to collect the coverage on demand. + ## `v8.takeCoverage()` - -The `v8.stopCoverage()` method allows the user to stop the coverage collection -started by [`NODE_V8_COVERAGE`][], so that V8 can release the execution count -records and optimize code. This can be used in conjunction with -[`v8.takeCoverage()`][] if the user wants to collect the coverage on demand. - ## `v8.writeHeapSnapshot([filename])`