> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# PerformanceEntry

APISummary
`PerformanceEntry` 是一个基类接口，用于描述性能事件的完整数据。所有性能事件都继承并扩展它，常见的包括[容器](/next/zh/guide/spec.md#container)初始化、页面加载和渲染时间等。

所有性能事件汇总如下图所示：

![](https://lf-lynx.tiktok-cdns.com/obj/lynx-artifacts-oss-sg/plugin/static/performance-entry-3-7-compressed.png)
## 实例属性

### entryType

```tsx
entryType: string;
```

表示 `PerformanceEntry` 类型的字符串。当前支持的类型有：`init`、`metric` 和 `pipeline`，其含义如下：

- **`init`**: 记录 Lynx 页面显示前的初始化性能事件。
- **`metric`**: 记录性能指标事件，如 FCP（First Contentful Paint）和 ActualFMP（Actual First Meaningful Paint）。
- **`pipeline`**: 记录渲染过程的性能事件。
- **`resource`**: 记录资源加载的性能事件。

以上取值所有对应的 `PerformanceEntry` 子类如下表所示：

|  entryType |                                                                                                                                                                    子类型                                                                                                                                                                   |
| :--------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|   `init`   | [`InitContainerEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/init-container-entry.md), [`InitLynxviewEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/init-lynxview-entry.md), [`InitBackgroundRuntimeEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/init-background-runtime-entry.md) |
|  `metric`  |                                                               [`MetricFcpEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/metric-fcp-entry.md), [`MetricActualfmpEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/metric-actual-fmp-entry.md)                                                              |
| `pipeline` |                  [`PipelineEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/pipeline-entry.md), [`LoadBundleEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/load-bundle-entry.md), [`ReloadBundleEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/reload-bundle-entry.md)                  |
| `resource` |                                                                                                                     [`LazyBundleEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/lazy-bundle-entry.md)                                                                                                                    |

### name

```tsx
name: string;
```

表示 `PerformanceEntry` 名称的字符串。值取决于 `PerformanceEntry` 的具体类型。所有子类型对应的 `name` 如下表所示：

|                                                            子类型                                                           |                                           name                                           |
| :----------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------: |
|          [`InitContainerEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/init-container-entry.md)         |                                        `container`                                       |
|           [`InitLynxviewEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/init-lynxview-entry.md)          |                                        `lynxview`                                        |
| [`InitBackgroundRuntimeEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/init-background-runtime-entry.md) |                                    `backgroundRuntime`                                   |
|              [`MetricFcpEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/metric-fcp-entry.md)             |                                           `fcp`                                          |
|       [`MetricActualFmpEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/metric-actual-fmp-entry.md)       |                                        `actualFmp`                                       |
|               [`PipelineEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/pipeline-entry.md)               | `updateTriggeredByBts`, `updateTriggeredByNative`, `updateGlobalProps`, `setNativeProps` |
|             [`LoadBundleEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/load-bundle-entry.md)            |                  `loadBundle`, `reloadBundleFromNative`, `reloadFromBts`                 |
|             [`LazyBundleEntry`](/next/zh/api/lynx-api/performance-api/performance-entry/lazy-bundle-entry.md)            |                                       `lazyBundle`                                       |

## 兼容性

**Compatibility Table**

**Query:** `lynx-api.performance-api.performance-entry`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-api/performance-api/performance-entry.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| performance-entry | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |

