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

# deprecated MetricActualFmpEntry

:::warning
This event has been deprecated since Lynx SDK 3.7. Related data can be obtained from [`PipelineEntry`](/next/api/lynx-api/performance-api/performance-entry/pipeline-entry.md).
:::

APISummary
Actual FMP is a key performance metric that measures the time taken for the rendering of the "real data" of a page to complete. It reflects how quickly users see the actual data on the page. `MetricActualFmpEntry` interface provides timing information about this metric, inheriting from [`PerformanceEntry`](/next/api/lynx-api/performance-api/performance-entry.md).

You can generate this metric by marking the [lynx pipeline](/next/guide/spec.md#lynx-pipeline) that contains important elements with [`__lynx_timing_flag="__lynx_timing_actual_fmp"`](/next/guide/performance/monitor-performance/timing-flag.md).

In the "real data" rendering, the timing for Actual FMP is as follows:

![](https://lf-lynx.tiktok-cdns.com/obj/lynx-artifacts-oss-sg/lynx-website/assets/doc/performance-metrics-actual-fmp.png)
Depending on different starting points, Lynx provides three metrics: `actualFmp`, `lynxActualFmp`, and `totalActualFmp`. Each metric's definition in the rendering process is illustrated in the diagram below:

![](https://lf-lynx.tiktok-cdns.com/obj/lynx-artifacts-oss-sg/lynx-website/assets/doc/metric-actual-fmp-entry.png)
## Example

This example demonstrates how to generate and obtain a `MetricActualFmpEntry`.

Lynx calculates the Actual Fmp when the marked elements have finished rendering. If you have provided container-related timestamps using [LynxView.setExtraTiming](/next/api/lynx-native-api/lynx-view/set-extra-timing.md), the `MetricActualFmpEntry` includes three metrics: `actualFmp`, `lynxActualFmp`, and `totalActualFmp`. Otherwise, the `MetricActualFmpEntry` only contains `lynxActualFmp`. After supplementing the [container](/next/guide/spec.md#container) timestamp, the remaining metrics will be recalculated. Once recalculation is complete, Lynx will send a new `lynxActualFmp` containing all the metrics.

**This is an example below: performance-api**

**Entry:** `src/actual-fmp-entry`
**Bundle:** `dist/actual-fmp-entry.lynx.bundle`

```tsx {12-22,27,34}
import * as React from "@lynx-js/react";
import { root, useMemo, useState } from "@lynx-js/react";
import type { MetricActualFmpEntry, PerformanceEntry } from "@lynx-js/types";
import "./index.scss";

export default function MetricActualFmpEntryExample(this: any) {
  const [msg, setMsg] = useState<string>("This is the initialization data.");
  const [actualfmpEntry, setActualFMPEntry] = useState<string>("");
  const [hasActualData, setHasActualData] = useState<boolean>(false);

  useMemo(() => {
    "background-only";
    // 1. Create a performance observer.
    const observer = lynx.performance.createObserver((entry: PerformanceEntry) => {
      if (entry.entryType == "metric" && entry.name == "actualFmp") {
        // 3. Received "metric.actualFmp" event.
        const actualfmpEntry = entry as MetricActualFmpEntry;
        setActualFMPEntry("actualfmpEntry : " + JSON.stringify(actualfmpEntry, null, 4));
      }
    });
    // 2. egister to listen to the "metric.actualFmp" event.
    observer.observe(["metric.actualFmp"]);

    // Update real data after simulating a network request.
    setTimeout(() => {
      setMsg("This is the actual data.");
      setHasActualData(true);
    }, 3000);
  }, []);

  return (
    <view className="container">
      <text className="title">Hello MetricActualFmpEntry~</text>
      <text __lynx_timing_flag={hasActualData ? "__lynx_timing_actual_fmp" : ""}>{msg}</text>
      <text className="entry">{actualfmpEntry}</text>
    </view>
  );
}

root.render(<MetricActualFmpEntryExample />);

if (import.meta.webpackHot) {
  import.meta.webpackHot.accept();
}

```

v0.8.0



## Instance Properties

### [entryType](/next/api/lynx-api/performance-api/performance-entry.md#entrytype)

```ts
entryType: string;
```

The type of performance event; the value for all instances of this class is fixed as `metric`.

### [name](/next/api/lynx-api/performance-api/performance-entry.md#name)

```ts
name: string;
```

The specific name of the performance event; the value for all instances of this class is fixed as `actualFmp`.

### actualFmp

```ts
actualFmp?: PerformanceMetric;
```

The time taken from preparing the [TemplateBundle](/next/api/lynx-native-api/template-bundle.md) to the completion of rendering for components and tags marked with `__lynx_timing_flag="__lynx_timing_actual_fmp"`, with a data type of [`PerformanceMetric`](/next/api/lynx-api/performance-api/performance-metric.md).

Calculation formula: `actualFmp = PipelineEntry.paintEnd - InitContainerEntry.prepareTemplateStart`.

### lynxActualFmp

```ts
lynxActualFmp: PerformanceMetric;
```

The time taken from loading the [TemplateBundle](/next/api/lynx-native-api/template-bundle.md) to the completion of rendering for components and tags marked with `__lynx_timing_flag="__lynx_timing_actual_fmp"`, with a data type of [`PerformanceMetric`](/next/api/lynx-api/performance-api/performance-metric.md).

Calculation formula: `lynxActualFmp = PipelineEntry.paintEnd - LoadBundleEntry.loadBundleStart`.

### totalActualFmp

```ts
totalActualFmp?: PerformanceMetric;
```

The time taken from the user opening the page to the completion of rendering for components and tags marked with `__lynx_timing_flag="__lynx_timing_actual_fmp"`, with a data type of [`PerformanceMetric`](/next/api/lynx-api/performance-api/performance-metric.md).

Calculation formula: `totalActualFmp = PipelineEntry.paintEnd - InitContainerEntry.openTime`.

## Compatibility

**Compatibility Table**

**Query:** `lynx-api.performance-api.performance-entry.metric-actual-fmp-entry`

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

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

