← Back to Profiler domain

Profiler.takePreciseCoverage

Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.

Domain: Profiler stable

Returns

NameTypeDescription
resultarrayCoverage data for the current isolate.
timestampnumberMonotonically increasing time (in seconds) when the coverage update was taken in the backend.

Example Request

{
  "id": 1,
  "method": "Profiler.takePreciseCoverage"
}

Example Response

{
  "id": 1,
  "result": {
    "result": {
      "type": "string",
      "value": "Example Domain"
    },
    "timestamp": 1.0
  }
}

Usage in Node.js

const result = await send('Profiler.takePreciseCoverage');
console.log(result);
// {"result": {"type": "string", "value": "Example Domain"}, "timestamp": 1.0}