Performance
✅️️ Methods
🔨Performance.disable
禁用收集和报告指标。
EN
Disable collecting and reporting metrics.
🔨Performance.enable
启用收集和报告指标功能。
EN
Enable collecting and reporting metrics.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| timeDomain | string | 用于收集和报告持续时间指标的时域。 允许值: timeTicks、threadTicks | ENTime domain to use for collecting and reporting duration metrics.Allowed Values: timeTicks, threadTicks |
🔨Performance.getMetrics
获取运行时指标的当前值。
EN
Retrieve current values of run-time metrics.
| 返回对象 | 类型 | 描述 | 原文 |
|---|---|---|---|
| metrics | array[Metric] | 当前运行时指标的值。 | ENCurrent values for run-time metrics. |
🔨Performance.setTimeDomain🧪❌️
设置用于收集和报告持续时间指标的时间域。请注意,此操作必须在启用指标收集之前调用。在指标收集已启用时调用此方法将返回错误。
EN
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.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| timeDomain | ✔️ | string | 时域 允许取值: timeTicks, threadTicks | ENTime domainAllowed Values: timeTicks, threadTicks |
✅️️ Events
👋Performance.metrics
指标的当前值。
EN
Current values of the metrics.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| metrics | ✔️ | array[Metric] | 指标当前值。 | ENCurrent values of the metrics. | |
| title | ✔️ | string | 时间戳标题。 | ENTimestamp title. |
✅️️ Types
📌Performance.Metric
运行时执行指标。
EN
Run-time execution metric.
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| name | ✔️ | string | 指标名称。 | ENMetric name. | |
| value | ✔️ | number | 指标值。 | ENMetric value. |