Skip to content

Commit 9b99037

Browse files
committed
doc: move v8.stopCoverage() to expected location in doc
PR-URL: nodejs#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 9ad96e2 commit 9b99037

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

doc/api/v8.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,19 @@ v8.setFlagsFromString('--trace_gc');
223223
setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3);
224224
```
225225

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

228241
<!-- YAML
@@ -240,19 +253,6 @@ by [`NODE_V8_COVERAGE`][].
240253
When the process is about to exit, one last coverage will still be written to
241254
disk unless [`v8.stopCoverage()`][] is invoked before the process exits.
242255

243-
## `v8.stopCoverage()`
244-
245-
<!-- YAML
246-
added:
247-
- v15.1.0
248-
- v12.22.0
249-
-->
250-
251-
The `v8.stopCoverage()` method allows the user to stop the coverage collection
252-
started by [`NODE_V8_COVERAGE`][], so that V8 can release the execution count
253-
records and optimize code. This can be used in conjunction with
254-
[`v8.takeCoverage()`][] if the user wants to collect the coverage on demand.
255-
256256
## `v8.writeHeapSnapshot([filename])`
257257
<!-- YAML
258258
added: v11.13.0

0 commit comments

Comments
 (0)