chrome-devtools-kotlin / org.hildan.chrome.devtools.domains.profiler / ProfilerDomain

ProfilerDomain

class ProfilerDomain

Functions

consoleProfileFinished

fun consoleProfileFinished(): Flow<ConsoleProfileFinishedEvent>

consoleProfileStarted

Sent when new profile recording is started using console.profile() call.

fun consoleProfileStarted(): Flow<ConsoleProfileStartedEvent>

disable

suspend fun disable(): Unit

disableCounters

Disable counters collection.

suspend fun disableCounters(): Unit

disableRuntimeCallStats

Disable run time call stats collection.

suspend fun disableRuntimeCallStats(): Unit

enable

suspend fun enable(): Unit

enableCounters

Enable counters collection.

suspend fun enableCounters(): Unit

enableRuntimeCallStats

Enable run time call stats collection.

suspend fun enableRuntimeCallStats(): Unit

events

Subscribes to all events related to this domain.

fun events(): Flow<ProfilerEvent>

getBestEffortCoverage

Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.

suspend fun getBestEffortCoverage(): GetBestEffortCoverageResponse

getCounters

Retrieve counters.

suspend fun getCounters(): GetCountersResponse

getRuntimeCallStats

Retrieve run time call stats.

suspend fun getRuntimeCallStats(): GetRuntimeCallStatsResponse

preciseCoverageDeltaUpdate

Reports coverage delta since the last poll (either from an event like this, or from takePreciseCoverage for the current isolate. May only be sent if precise code coverage has been started. This event can be trigged by the embedder to, for example, trigger collection of coverage data immediatelly at a certain point in time.

fun preciseCoverageDeltaUpdate(): Flow<PreciseCoverageDeltaUpdateEvent>

setSamplingInterval

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

suspend fun setSamplingInterval(input: SetSamplingIntervalRequest): Unit

start

suspend fun start(): Unit

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.

suspend fun startPreciseCoverage(input: StartPreciseCoverageRequest): StartPreciseCoverageResponse

startTypeProfile

Enable type profile.

suspend fun startTypeProfile(): Unit

stop

suspend fun stop(): StopResponse

stopPreciseCoverage

Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.

suspend fun stopPreciseCoverage(): Unit

stopTypeProfile

Disable type profile. Disabling releases type profile data collected so far.

suspend fun stopTypeProfile(): Unit

takePreciseCoverage

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

suspend fun takePreciseCoverage(): TakePreciseCoverageResponse

takeTypeProfile

Collect type profile.

suspend fun takeTypeProfile(): TakeTypeProfileResponse