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

# PerformanceMetric

APISummary
Describes the type that includes the performance metric name, metric value, and start/end timestamps.

In Lynx, several metric types are provided, such as [`MetricFcpEntry`](/next/api/lynx-api/performance-api/performance-entry/metric-fcp-entry.md) and [`MetricActualFmpEntry`](/next/api/lynx-api/performance-api/performance-entry/metric-actual-fmp-entry.md). Each metric type contains multiple metrics based on different starting points (for example, `MetricFcpEntry` includes metrics like `fcp`, `lynxFcp`, and `totalFcp`). To better describe the duration and timestamps of each metric, the `PerformanceMetric` type is designed.

## Attributes

### name

```ts
name: string;
```

The name of the metric, such as `fcp`, `lynxFcp`, `totalFcp`, etc.

### duration

```ts
duration: number;
```

The metric value in milliseconds with a microsecond precision(0.001ms). An example value is 100.099.

The calculation formula is: `duration = endTimestamp - startTimestamp`.

### startTimestampName

```ts
startTimestampName: string;
```

The name of the metric's start timestamp, such as `loadBundleStart` in [`LoadBundleEntry`](/next/api/lynx-api/performance-api/performance-entry/load-bundle-entry.md).

### startTimestamp

```ts
startTimestamp: number;
```

The start timestamp of the metric, an Unix timestamp in milliseconds with a microsecond precision(0.001ms). An example value is 1739594612307.429.

### endTimestampName

```ts
endTimestampName: string;
```

The name of the metric's end timestamp, such as `paintEnd` in [`LoadBundleEntry`](/next/api/lynx-api/performance-api/performance-entry/load-bundle-entry.md).

### endTimestamp

```ts
endTimestamp: number;
```

The end timestamp of the metric, an Unix timestamp in milliseconds with a microsecond precision(0.001ms). An example value is 1739594612307.429.

## Compatibility

**Compatibility Table**

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

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

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

