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

# profileFlowId()

APISummary为 [flow
events](https://perfetto.dev/docs/instrumentation/track-events#flows)
生成一个唯一的 flow id.

## 语法

```typescript
profileFlowId(): number;
```

## 返回值

一个唯一的 flow id 数字。

## 示例

```typescript
const flowId = lynx.performance.profileFlowId();
lynx.performance.profileStart('UserAction', { flowId });
lynx.performance.profileMark('ActionCheckpoint', { flowId });
lynx.performance.profileEnd();
```

## 兼容性

**Compatibility Table**

**Query:** `lynx-api.lynx.performance.profileFlowId()`

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

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| profileFlowId() | Yes (3.3) | Unknown | Yes (3.3) | Yes (3.5) | Yes (3.5) | Yes |

**`profileFlowId()`**

- **Web — Supported (version unknown):** Implemented since `@lynx-js/web-core@0.22.0` (lynx-family/lynx-stack#2874).

