Skip to content

Commit 0d098bf

Browse files
Trotttargos
authored andcommitted
doc: move v8.stopCoverage() to expected location in doc
PR-URL: #39212 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Harshitha K P <harshitha014@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent bd6af78 commit 0d098bf

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

doc/api/v8.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,17 @@ v8.setFlagsFromString('--trace_gc');
223223
setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3);
224224
```
225225

226+
## `v8.stopCoverage()`
227+
228+
<!-- YAML
229+
added: REPLACEME
230+
-->
231+
232+
The `v8.stopCoverage()` method allows the user to stop the coverage collection
233+
started by [`NODE_V8_COVERAGE`][], so that V8 can release the execution count
234+
records and optimize code. This can be used in conjunction with
235+
[`v8.takeCoverage()`][] if the user wants to collect the coverage on demand.
236+
226237
## `v8.takeCoverage()`
227238

228239
<!-- YAML
@@ -238,17 +249,6 @@ by [`NODE_V8_COVERAGE`][].
238249
When the process is about to exit, one last coverage will still be written to
239250
disk unless [`v8.stopCoverage()`][] is invoked before the process exits.
240251

241-
## `v8.stopCoverage()`
242-
243-
<!-- YAML
244-
added: REPLACEME
245-
-->
246-
247-
The `v8.stopCoverage()` method allows the user to stop the coverage collection
248-
started by [`NODE_V8_COVERAGE`][], so that V8 can release the execution count
249-
records and optimize code. This can be used in conjunction with
250-
[`v8.takeCoverage()`][] if the user wants to collect the coverage on demand.
251-
252252
## `v8.writeHeapSnapshot([filename])`
253253
<!-- YAML
254254
added: v11.13.0

0 commit comments

Comments
 (0)