The sampling logs of stress testing consist of the request details, response details, and time consumption of a request throughout the core lifecycle of the stress testing API. When you perform stress testing or check a test report, you can view and analyze the sampling logs to quickly identify and resolve issues.
Prerequisites
A stress test is initiated. For more information, see Quick start of PTS-based stress testing and Quick start of JMeter-based stress testing.
Background information
Sampling logs are collected at a sampling rate of 1% and retained for 30 days.
Procedure
PTS scenario
On the page for an ongoing stress test or on the Report Details page, click the Request Sampling Log tab.
Specify the search criteria and click Search.
Parameter
Description
API
Select an API for testing.
Request/Business Status
Select a value based on the request status or business status. If the checkpoints (assertions) are passed, the request is successful. If the checkpoints (assertions) are not passed, the request fails.
RT Range
Configure the Min RT and Max PT fields to search for logs based on the response time range.
Status Code
Search for logs by status code, such as 200 or 302.
Find the required logs in the search result and click View Details in the Actions column.
In the Log Details dialog box, view the following information:
On the General tab, view the headers and bodies of the request and response.

On the Timing Waterfall tab, view the time consumption of a request throughout the core lifecycle.
DNS: the time that is required to perform Domain Name System (DNS) queries.
ConnectTime: the time that is required to establish a connection.
Request Sent: the time that is required to send a network request.
Waiting(TTFB): the time that is required to wait for the initial response. This parameter captures the latency of the round trip to the server and the time required to wait for the server response.
Content Download: the time that is required to receive a response.
NoteYou can move the pointer over the waterfall to view the values of the
DNS,ConnectTime,Request Sent, andWaitingparameters.Timing in sampling logs records the time consumption of a request throughout the core lifecycle, which facilitates issue identification, but does not calculate the time consumption of a request throughout the core lifecycle in all phases.
JMeter scenario
On the page for an ongoing stress test or on the Report Details page, click the Request Sampling Log tab.
Specify the search criteria and click Search.
Parameter
Description
Sampler
Select an API for testing. You can select only one API.
Response Status
Select multiple values, including the request status (failed) and business status (failed or successful). The business status is available only for stress testing scenarios in which assertions are configured.
Time Range
Specify the time when the logs are generated. Minimum unit: seconds.
RT Range
Configure the Min RT and Max PT fields to search for logs based on the response time range.
Status Code
Search for logs by status code, such as 200 and 302.
NoteYou cannot query historical logs that are generated before August 14, 2020 by status code.
Find the required logs in the search result list, and click Click to view details in the Actions column. During the stress test or in the test report, you can use the test sampling logs and call chain information to quickly identify issues. The logs include the following information:
The General tab displays the fields and values of the sampling logs.

The Timing Waterfall tab displays the time consumption of a request throughout the core lifecycle.
DNS Lookup: the time that is required to perform DNS queries.
Get Connected: the time that is required to establish a connection.
Request Sent: the time that is required to send a network request.
Waiting(TTFB): the time that is required to wait for the initial response. This parameter captures the latency of the round trip to the server and the time required to wait for the server response.
Content Download: the time that is required to receive a response.
NoteTiming in sampling logs records the time consumption of a request throughout the core lifecycle, which facilitates issue identification, but does not calculate the time consumption of a request throughout the core lifecycle in all phases.