src/domains/profiler

This module provides a direct mapping of CDP events and commands for v1.3 (stable) of the Profiler Domain.

Types

Profiler {.pure.} = enum
  consoleProfileFinished = "Profiler.consoleProfileFinished",
  consoleProfileStarted = "Profiler.consoleProfileStarted"
Profiler Domain events

Procs

proc disableProfileDomain(tab: Tab): owned(Future[void]) {....stackTrace: false,
    raises: [Exception],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}
Profiler.disable
proc enableProfileDomain(tab: Tab): owned(Future[void]) {....stackTrace: false,
    raises: [Exception],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}
Profiler.enable
proc getBestEffortCoverage(tab: Tab): Future[JsonNode] {....stackTrace: false,
    raises: [Exception, ValueError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}
Profiler.getBestEffortCoverage
proc setSamplingInterval(tab: Tab; interval: int): owned(Future[void]) {.
    ...stackTrace: false, raises: [Exception],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}

Profiler.setSamplingInterval

Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.

proc start(tab: Tab): owned(Future[void]) {....stackTrace: false,
    raises: [Exception],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}
Profiler.start
proc startPreciseCoverage(tab: Tab): Future[JsonNode] {....stackTrace: false,
    raises: [Exception, ValueError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}
proc startPreciseCoverage(tab: Tab; params: JsonNode): Future[JsonNode] {.
    ...stackTrace: false, raises: [Exception, ValueError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}

Profiler.startPreciseCoverage

Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.

proc stop(tab: Tab): Future[JsonNode] {....stackTrace: false,
                                        raises: [Exception, ValueError], tags: [
    RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}
Profiler.stop
proc stopPreciseCoverage(tab: Tab): owned(Future[void]) {....stackTrace: false,
    raises: [Exception],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}
Profiler.stopPreciseCoverage
proc takePreciseCoverage(tab: Tab): Future[JsonNode] {....stackTrace: false,
    raises: [Exception, ValueError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, TimeEffect], forbids: [].}
Profiler.takePreciseCoverage