> 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.

# onPerformanceEvent

APISummary
通知客户端性能事件已发送。每当生成性能事件时，都会调用该方法，包括但不限于容器初始化、引擎渲染、渲染指标更新等。

## 语法

### Android

```java
public void onPerformanceEvent(@NonNull PerformanceEntry entry);
```

#### 参数

- `entry`: 性能事件的 [PerformanceEntry](/next/zh/api/lynx-api/performance-api/performance-entry.md)。

### iOS

```objc
- (void)onPerformanceEvent:(nonnull LynxPerformanceEntry *)entry;
```

#### 参数

- `entry`: 性能事件的 [PerformanceEntry](/next/zh/api/lynx-api/performance-api/performance-entry.md)。

### Harmony

```typescript
public onPerformanceEvent(entry: PerformanceEntry): void;
```

#### 参数

- `entry`: 性能事件的 [PerformanceEntry](/next/zh/api/lynx-api/performance-api/performance-entry.md)。

## 兼容性

**Compatibility Table**

**Query:** `lynx-native-api.lynx-view-client.on-performance-event`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-native-api/lynx-view-client/on-performance-event.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| on-performance-event | Yes (3.4) | Yes (3.4) | Yes (3.4) | No | No | No |

**`on-performance-event`**

Notify the client that a performance event has been sent. It will be called every time a performance event is generated, including but not limited to container initialization, engine rendering, rendering metrics update, etc.

**Specifications:**

