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

# profileStart()

APISummary
Marks the start of a [trace
event](https://perfetto.dev/docs/instrumentation/track-events).

## Syntax

```typescript
profileStart(name: string, option?: { flowId: number, arg?:  Record<string, string>}): void;
```

## Parameters

##### `name`

The name of the trace event.

##### `option` (optional)

Additional options such as `flowId` and custom arguments.

## Examples

```typescript
// Start a trace event with only a name
lynx.performance.profileStart('DataFetch');

// Start a trace event with custom arguments
lynx.performance.profileStart('DataFetch', {
  args: { url: 'https://api.example.com/data', method: 'GET' },
});

// Start a trace event with a flow id
const flowId = lynx.performance.profileFlowId();
lynx.performance.profileStart('UserAction', { flowId });

// Start a duration event with both arguments and flow ID
lynx.performance.profileStart('ComplexProcess', {
  args: { step: 'start' },
  flowId,
});
```

## Compatibility

**Compatibility Table**

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

[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 |
| --- | --- | --- | --- | --- | --- | --- |
| profileStart() | Yes (3.3) | Unknown | Yes (3.3) | Yes (3.5) | Yes (3.5) | Yes |

**`profileStart()`**

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

