# NetworkPerformanceTiming **Repository Path**: llince/network-performance-timing ## Basic Information - **Project Name**: NetworkPerformanceTiming - **Description**: 本示例为开发者展示http数据请求的性能分析API:PerformanceTiming,以表格的形式展示从request到对应阶段完成的耗时。 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 4 - **Created**: 2024-09-23 - **Last Updated**: 2025-08-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Network Performance Analysis ### Overview This sample shows how to use **PerformanceTiming()** to obtain detailed timing information about each phase in an HTTP data request process in a table. ### Preview ![](./screenshots/device/network_EN.png) ### Project Directory ``` ├──entry/src/main/ets/ │ ├──constants │ │ └──Constants.ets // Common constants │ ├──entryability │ │ └──EntryAbility.ets // Entry ability │ └──pages │ └──Index.ets // Home page └──entry/src/main/resources // Static resources ``` ### How to Implement 1. Create an HTTP request and set the **headersReceive** callback. 2. Set request parameters, including **method**, **header**, and more. 3. Initiate a request. 4. Parse the response, in which **performanceTiming** provides the time used in each phase of the request process. ### Required Permissions - **ohos.permission.INTERNET**: allows an app to access Internet. - **ohos.permission.GET_NETWORK_INFO**: allows an app to obtain network information. - **ohos.permission.SET_NETWORK_INFO**: allows an app to set network information. ### Dependencies N/A ### Constraints 1. The sample is only supported on Huawei phones with standard systems. 2. The HarmonyOS version must be HarmonyOS 5.0.5 Release or later. 3. The DevEco Studio version must be DevEco Studio 5.0.5 Release or later. 4. The HarmonyOS SDK version must be HarmonyOS 5.0.5 Release SDK or later.