Skip to content

V8 coverage API next steps #35783

Open
Open
@joyeecheung

Description

@joyeecheung

Opening an issue to track the work before moving v8.startCoverage() and v8.stopCoverage() out of experiment. This will take some refactoring. See #33807 (comment) and #33807 (comment)

  1. Add a v8.startCoverage() method to reuse the per-env connection, if NODE_V8_COVERAGE is not set (would be useful to restart after v8.stopCoverage())
  2. It would be good to have an API that (optionally?) returns the coverage result. I think it should be v8.takeCoverage() as the Profiler.stopPreciseCoverage command doesn't return this but the Profiler.takePreciseCoverage does. Also, I realize that this method should be asynchronous as there's no guarantee that we can get the response from inspector synchronously (it just happens to be this way right now), so it should probably return a promise.
  3. Error reporting can be improved (return a rejection?)

Also #35212

Metadata

Metadata

Assignees

Labels

coverageIssues and PRs related to native coverage support.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions