Performance

class Performance(cdp: CDP) : Domain

Constructors

Link copied to clipboard
constructor(cdp: CDP)

Types

Link copied to clipboard
@Serializable
data class EnableParameter(val timeDomain: String? = null)
Link copied to clipboard
@Serializable
data class GetMetricsReturn(val metrics: List<Performance.Metric>)
Link copied to clipboard
@Serializable
data class Metric(val name: String, val value: Double)

Run-time execution metric.

Link copied to clipboard
@Serializable
data class MetricsParameter(val metrics: List<Performance.Metric>, val title: String)

Current values of the metrics.

Link copied to clipboard
@Serializable
data class SetTimeDomainParameter(val timeDomain: String)

Properties

Link copied to clipboard

Current values of the metrics.

Functions

Link copied to clipboard
suspend fun disable(mode: CommandMode = CommandMode.DEFAULT)

Disable collecting and reporting metrics.

Link copied to clipboard
suspend fun enable(timeDomain: String? = null)
suspend fun enable(args: Performance.EnableParameter, mode: CommandMode = CommandMode.DEFAULT)

Enable collecting and reporting metrics.

Link copied to clipboard
suspend fun getMetrics(mode: CommandMode = CommandMode.DEFAULT): Performance.GetMetricsReturn

Retrieve current values of run-time metrics.

Link copied to clipboard
suspend fun setTimeDomain(timeDomain: String)
suspend fun setTimeDomain(args: Performance.SetTimeDomainParameter, mode: CommandMode = CommandMode.DEFAULT)

Sets time domain to use for collecting and reporting duration metrics. Note that this must be called before enabling metrics collection. Calling this method while metrics collection is enabled returns an error.