You can call the DescribeCloudBenchTasks operation to query stress testing tasks.
Operation description
Database Autonomy Service (DAS) provides an intelligent stress testing feature that helps you determine to scale out your instance to handle service traffic peaks. For more information, see Intelligent stress testing.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hdm:DescribeCloudBenchTasks |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Status |
string |
No |
The status of the task. Valid values:
|
SUCCESS |
| TaskType |
string |
No |
The type of the stress testing task. Valid values:
|
pressure test |
| StartTime |
string |
No |
The beginning of the time range to query. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. |
1596177993000 |
| EndTime |
string |
No |
The end of the time range to query. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Note
The end time must be later than the start time. |
1596177993001 |
| PageNo |
string |
No |
The page number. The value must be a positive integer. Default value: 1. |
1 |
| PageSize |
string |
No |
The number of entries to return on each page. The value must be a positive integer. Default value: 10. |
10 |
Response parameters
|
Parameter |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The HTTP status code returned. |
200 |
| Message |
string |
The data returned. Note
If the request is successful, Successful is returned. If the request fails, an error message such as an error code is returned. |
Successful |
| RequestId |
string |
The request ID. |
B6D17591-B48B-4D31-9CD6-9B9796B2**** |
| Success |
string |
Indicates whether the request was successful. Valid values:
|
true |
| Data |
object |
The detailed information, including the total number of entries returned and the error codes. |
|
| PageNo |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries returned on each page. |
10 |
| Extra |
string |
The reserved parameter. |
None |
| Total |
integer |
The total number of entries returned. |
2 |
| List |
object |
||
| cloudbenchTasks |
array<object> |
The detailed information about the stress testing tasks. |
|
|
object |
|||
| DtsJobName |
string |
The name of the DTS task. |
RDS间迁移 |
| ErrorMessage |
string |
The error message returned if the task fails. |
DTS-070211: Connect Source DB failed. cause by [com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:Could not create connection to database server. Attempted reconnect 3 times. Giving up.][com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link failure\n\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.][java.net.ConnectException:Connection timed out (Connection timed out)] About more information in [https://yq.aliyun.com/articles/499178]. |
| External |
string |
The additional information. |
Null |
| BackupType |
string |
The backup type. Valid values:
|
TIMESTAMP |
| UserId |
string |
The ID of the Alibaba Cloud account. |
1091411816252**** |
| DstType |
string |
The type of the destination instance. Valid values:
|
Instance |
| EcsInstanceId |
string |
The ID of the ECS instance. |
i-bp1ecr5go2go1**** |
| DstInstanceUuid |
string |
The unique ID of the destination instance. |
hdm_d887b5ccf99fa0dc9a1e5aaac368**** |
| TaskType |
string |
The type of the stress testing task. Valid values:
|
pressure test |
| BenchStep |
string |
The sub-step of the stress testing task. Valid values:
|
PROCEED |
| Version |
string |
The version of the stress testing task. Valid values:
|
V3.0 |
| EndState |
string |
The state of the stress testing task after it is complete. Valid values:
Note
After the stress testing task enters the state specified by the EndState parameter, the task becomes complete. |
WAIT_TARGET |
| SrcInstanceUuid |
string |
The unique ID of the source instance. |
hdm_3063db6792965c080a4bcb6e6304**** |
| ClientType |
string |
The type of the stress testing client. Valid values:
|
ECS |
| State |
string |
The state of the stress testing task. Valid values:
|
WAIT_TARGET |
| DstIp |
string |
The reserved parameter. |
None |
| SrcPublicIp |
string |
The reserved parameter. |
None |
| BackupId |
string |
The backup set ID. You can call the DescribeBackups operation to query the backup list. |
229132 |
| SqlCompleteReuse |
string |
The information about the full SQL statements that are reused. |
{"sqlUuid":"task_a37d2f07-45cb-4413-a2a6-c66c68****","metaUuid":"task_211e2561-5c0c-486b-864c-56b511****","sqlFile":"cl-1620057600000-1800626.sc","metaFile":"cl-1620057600000-1800626.meta"} |
| SmartPressureTime |
integer |
The duration of the generated stress testing task. Unit: milliseconds. |
86400000 |
| ArchiveState |
integer |
The status of SQL data archiving. Valid values:
|
1 |
| Status |
string |
The status of the stress testing task. Valid values:
|
RUNNING |
| WorkDir |
string |
The temporary directory generated for stress testing. |
/tmp/bench/ |
| ArchiveOssTableName |
string |
The name of the table to which data is archived in OSS. |
custins15546355_161604665**** |
| DtsJobId |
string |
The ID of the DTS data migration task. |
i03e3zty16i**** |
| DtsJobState |
integer |
The status of the DTS task. Valid values:
|
CHECKING |
| DstPort |
integer |
The port number of the destination instance. |
3306 |
| DtsJobClass |
string |
The specifications of the DTS task. Note
For more information about the specifications and performance of data migration tasks, see Specifications of data migration tasks. |
medium |
| ClientGatewayId |
string |
The ID of the database gateway for the stress testing client. |
58598b2af48a0193dfc16fc6964ef**** |
| Description |
string |
The description of the stress testing task. |
test-das-bench-0501 |
| ErrorCode |
string |
The error code returned for the internal stress testing task. |
10109 |
| TableSchema |
string |
The names of the tables that are involved in the stress testing. |
[{"TABLE_NAME":"customer1","TABLE_SCHEMA":"tpcc"}] |
| DtsJobStatus |
string |
The status of the DTS task. Valid values:
|
PRE_CHECK_FAILED |
| SrcInstanceArea |
string |
The database type of the source instance. |
RDS |
| BenchStepStatus |
string |
The status of the stress testing sub-step. Valid values:
|
FINISHED |
| Source |
string |
The source of the task. Valid values:
|
DAS |
| ArchiveJobId |
string |
The ID of the data archiving task. |
'202105211430070112231480820340758**** |
| Topic |
string |
The consumer topic in Kafka. |
das |
| RequestDuration |
integer |
The duration of the stress testing task. Unit: milliseconds. |
86400000 |
| TaskId |
string |
The task ID. |
e5cec704-0518-430f-8263-76f4dcds**** |
| Rate |
integer |
The playback rate of the traffic from the source instance on the destination instance. The playback rate must be a positive integer. Valid values: 0 to 30. Default value: 1. |
1 |
Examples
Success response
JSON format
{
"Code": "200",
"Message": "Successful",
"RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
"Success": "true",
"Data": {
"PageNo": 1,
"PageSize": 10,
"Extra": "None",
"Total": 2,
"List": {
"cloudbenchTasks": [
{
"DtsJobName": "RDS间迁移",
"ErrorMessage": "DTS-070211: Connect Source DB failed. cause by [com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:Could not create connection to database server. Attempted reconnect 3 times. Giving up.][com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link failure\\n\\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.][java.net.ConnectException:Connection timed out (Connection timed out)] About more information in [https://yq.aliyun.com/articles/499178].",
"External": "Null",
"BackupType": "TIMESTAMP",
"UserId": "1091411816252****",
"DstType": "Instance",
"EcsInstanceId": "i-bp1ecr5go2go1****",
"DstInstanceUuid": "hdm_d887b5ccf99fa0dc9a1e5aaac368****",
"TaskType": "pressure test",
"BenchStep": "PROCEED",
"Version": "V3.0",
"EndState": "WAIT_TARGET",
"SrcInstanceUuid": "hdm_3063db6792965c080a4bcb6e6304****",
"ClientType": "ECS",
"State": "WAIT_TARGET",
"DstIp": "None",
"SrcPublicIp": "None",
"BackupId": "229132",
"SqlCompleteReuse": "{\"sqlUuid\":\"task_a37d2f07-45cb-4413-a2a6-c66c68****\",\"metaUuid\":\"task_211e2561-5c0c-486b-864c-56b511****\",\"sqlFile\":\"cl-1620057600000-1800626.sc\",\"metaFile\":\"cl-1620057600000-1800626.meta\"}",
"SmartPressureTime": 86400000,
"ArchiveState": 1,
"Status": "RUNNING",
"WorkDir": "/tmp/bench/",
"ArchiveOssTableName": "custins15546355_161604665****",
"DtsJobId": "i03e3zty16i****",
"DtsJobState": 0,
"DstPort": 3306,
"DtsJobClass": "medium",
"ClientGatewayId": "58598b2af48a0193dfc16fc6964ef****",
"Description": "test-das-bench-0501",
"ErrorCode": "10109",
"TableSchema": "[{\"TABLE_NAME\":\"customer1\",\"TABLE_SCHEMA\":\"tpcc\"}]",
"DtsJobStatus": "PRE_CHECK_FAILED",
"SrcInstanceArea": "RDS",
"BenchStepStatus": "FINISHED",
"Source": "DAS",
"ArchiveJobId": "'202105211430070112231480820340758****",
"Topic": "das",
"RequestDuration": 86400000,
"TaskId": "e5cec704-0518-430f-8263-76f4dcds****",
"Rate": 1
}
]
}
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The request parameters are invalid. | |
| 403 | NoPermission | You are not authorized to do this action. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.