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

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

APISummary
The `InitBackgroundRuntimeEntry` interface provides the key moments regarding the initialization of the [Background Thread Runtime](/next/guide/spec.md#background-thread-runtime). It inherits from [`PerformanceEntry`](/next/api/lynx-api/performance-api/performance-entry.md).

In the initialization process, the metrics are defined as shown in the figure below:
![key moments of background thread runtime initialization](https://lf-lynx.tiktok-cdns.com/obj/lynx-artifacts-oss-sg/lynx-website/assets/doc/init-background-runtime-entry.png)

## Examples

This example demonstrates how to retrieve `InitBackgroundRuntimeEntry`。

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

**Entry:** `src/init-background-runtime-entry`
**Bundle:** `dist/init-background-runtime-entry.lynx.bundle`

```tsx {11-23}
import * as React from "@lynx-js/react";
import { root, useMemo, useState } from "@lynx-js/react";
import type { InitBackgroundRuntimeEntry, PerformanceEntry } from "@lynx-js/types";

import "./index.css";

export default function InitBackgroundRuntimeEntryExample(this: any) {
  const [initBackgroundRuntimeEntry, setInitBackgroundRuntimeEntry] = useState<string>("");

  function observerPerformanceEntry() {
    "background-only";
    // 1. Create a performance observer.
    const observer = lynx.performance.createObserver((entry: PerformanceEntry) => {
      console.log(JSON.stringify(entry));
      if (entry.entryType == "init" && entry.name == "backgroundRuntime") {
        // 3. Received "init.backgroundRuntime" event.
        const initBackgroundRuntimeEntry = entry as InitBackgroundRuntimeEntry;
        setInitBackgroundRuntimeEntry(JSON.stringify(initBackgroundRuntimeEntry, null, 4));
        observer.disconnect();
      }
    });
    // 2. register to listen to the "init.backgroundRuntime" event.
    observer.observe(["init.backgroundRuntime"]);
  }

  useMemo(() => {
    observerPerformanceEntry();
  }, []);

  return (
    <view className="container">
      <text className="title">Hello InitBackgroundRuntimeEntry~</text>
      <text className="entry">{initBackgroundRuntimeEntry}</text>
    </view>
  );
}

root.render(<InitBackgroundRuntimeEntryExample />);

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

```

v0.8.0



## Instance properties

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

```tsx
entryType: string;
```

Returns the entry type, which is always `init`.

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

```tsx
name: string;
```

Returns the entry name, which is always `backgroundRuntime`.

### loadCoreStart

```tsx
loadCoreStart: number;
```

The start timestamp for initializing the [background thread runtime](/next/guide/spec.md#background-thread-runtime) environment. This timestamp is a floating-point Unix timestamp (in milliseconds), accurate to three decimal places. For example: 1739594612307.429.

### loadCoreEnd

```tsx
loadCoreEnd: number;
```

The end timestamp for initializing the [background thread runtime](/next/guide/spec.md#background-thread-runtime) environment. This timestamp is a floating-point Unix timestamp (in milliseconds), accurate to three decimal places. For example: 1739594612307.429.

## Compatibility

**Compatibility Table**

**Query:** `lynx-api.performance-api.performance-entry.init-background-runtime-entry`

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

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| init-background-runtime-entry | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |

**`init-background-runtime-entry`**

Entry for background runtime initialization performance data.

