目录

Network Diagnosis: Network

Function Description

DevEco Profiler provides the Network template to help you inspect the HTTP stack-related network and network traffic information at app runtime, facilitating troubleshooting and optimization for network issues. The request duration is divided into the following five phases: DNS resolution, TCP connection, TLS connection, request waiting, and response receiving. The duration in each phase is displayed, allowing for targeted optimization of latency issues. In addition, the Details pane displays the information carried in each request, including data from the request side and response side, as well as their respective header, body, and cookie information, facilitating network issue location.

The Network template supports the following lanes: Network Traffic, Network Request, User Trace, ArkTS Callstack, and Callstack. This section describes the Network Traffic and Network Request lanes. For details about other lanes, see the corresponding template.

  • Before analysis, create a Network analysis task and capture related data. For details, see In-depth Capture for Problem Locating. Alternatively, click Open File in the session area and import historical data.
  • The network analysis task only supports the recording and optimization for request-type interfaces in Network Kit.
  • Due to privacy and security policies, network analysis is not available for apps that have been released on AppGallery.

Viewing Network Traffic Consumption

Click the Network Traffic lane to display the network traffic consumption during the capture. In the data area below the lane, click the Summary and Details tabs to inspect the respective statistics.

Viewing Network Request Durations by Phase

Click the Network Request lane. Inspect changes in network request count that occur during the capture in the data area below the lane.

Analyzing Network-related Issues During Startup

You can use network analysis tasks in DevEco Profiler to identify and resolve network-related issues that occur during app startup.

The way DevEco Profiler handles an analysis task depends on whether the app is already running:
  • If you select an app that is not started yet, DevEco Profiler automatically starts the app to capture data when the task starts. After the capture is complete, the task enters the parsing phase.
  • If the app is running, DevEco Profiler stops it first when the analysis task starts, and then starts it again to capture data. Once data capture is complete, the task enters the parsing phase.

To start an analysis task, click next to the desired task in the task list.

After the analysis is complete, the data types displayed and processing methods used are consistent, regardless of the app's initial state (running or not).