All Products
Search
Document Center

Database Autonomy Service:DescribeCloudBenchTasks

Last Updated:Sep 24, 2024

Queries stress testing tasks.

Operation description

Database Autonomy Service (DAS) provides the intelligent stress testing feature. This feature helps you check whether your instance needs to be scaled up to effectively handle traffic spikes. For more information, see Intelligent stress testing.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
hdm:DescribeCloudBenchTasksget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
StatusstringNo

The status of the stress testing task. Valid values:

  • SUCCESS: The task is successful.
  • IGNORED: The task is ignored.
  • RUNNING: The task is running.
  • EXCEPTION: The task is abnormal.
SUCCESS
TaskTypestringNo

The type of the stress testing task. Valid values:

  • pressure test (default): A task of this type replays the traffic that is captured from the source instance on the destination instance at the maximum playback rate that is supported by the destination instance.
  • smart pressure test: A task of this type analyzes the traffic that is captured from the source instance over a short period of time and generates traffic on the destination instance for continuous stress testing. The business model based on which the traffic is generated on the destination instance and the traffic distribution are consistent with those on the source instance. Stress testing tasks of this type can help you reduce the amount of time that is consumed to collect data from the source instance and reduce storage costs and performance overheads.
pressure test
StartTimestringNo

The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1596177993000
EndTimestringNo

The end of the time range to query. Set this parameter to 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
PageNostringNo

The page number. The value must be a positive integer. Default value: 1.

1
PageSizestringNo

The number of entries per page. The value must be a positive integer. Default value: 10.

10

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The HTTP status code returned.

200
Messagestring

The returned message.

Note If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned.
Successful
RequestIdstring

The request ID.

B6D17591-B48B-4D31-9CD6-9B9796B2****
Successstring

Indicates whether the request was successful. Valid values:

  • true
  • false
true
Dataobject

The detailed information, including the error codes and the number of entries that are returned.

PageNointeger

The page number.

1
PageSizeinteger

The number of entries per page.

10
Extrastring

The reserved parameter.

None
Totallong

The total number of entries returned.

2
Listarray<object>

The detailed information of the stress testing task.

cloudbenchTasksobject
DtsJobNamestring

The name of the Data Transmission Service (DTS) migration task.

RDS_TO_RDS_MIGRATION
ErrorMessagestring

The error message returned if the task failed.

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].
Externalstring

The additional information.

Null
BackupTypestring

The backup type. Valid values:

  • TIMESTAMP: Data is restored to the state at a specific point in time.
  • BACKUPID: Data is restored from a backup set that is identified by an ID.
TIMESTAMP
UserIdstring

The Alibaba Cloud account ID.

1091411816252****
DstTypestring

The type of the identifier that is used to indicate the destination instance. Valid values:

  • Instance (default): the instance ID.
  • ConnectionString: the endpoint of the instance.
Instance
EcsInstanceIdstring

The ID of the Elastic Compute Service (ECS) instance.

i-bp1ecr5go2go1****
DstInstanceUuidstring

The UUID of the destination instance.

hdm_d887b5ccf99fa0dc9a1e5aaac368****
TaskTypestring

The type of the stress testing task. Valid values:

  • pressure test (default): A task of this type replays the traffic that is captured from the source instance on the destination instance at the maximum playback rate that is supported by the destination instance.
  • smart pressure test: A task of this type analyzes the traffic that is captured from the source instance over a short period of time and generates traffic on the destination instance for continuous stress testing. The business model based on which the traffic is generated on the destination instance and the traffic distribution are consistent with those on the source instance. Stress testing tasks of this type can help you reduce the amount of time that is consumed to collect data from the source instance and reduce storage costs and performance overheads.
pressure test
BenchStepstring

The substep in the stress testing task. Valid values:

  • NEW: Initialize the stress testing task.
  • WAIT_BUY_ECS: Purchase an ECS instance.
  • WAIT_START_ECS: Start the ECS instance.
  • WAIT_INSTALL_JDK: Install the Java Development Kit (JDK).
  • WAIT_INSTALL_DBGATEWAY: Install the database gateway (DBGateway).
  • ADD_SECURITY_IPS_STEP: Configure the whitelist of the security group.
  • ARCHIVE: Archive the file that stores the analysis results of full SQL statistics.
  • DOWNLOAD: Download the file that stores the analysis result of full SQL statistics.
  • PROCEED: Preprocess the file that stores the analysis result of full SQL statistics.
  • PRE_LOAD: Preload the file that stores the analysis result of full SQL statistics.
  • VALIDATE: Verify the functionality of stress testing.
  • PRESSURE: Start the stress testing task.
PROCEED
Versionstring

The version of the stress testing task. Valid values:

  • V2.0
  • V3.0
V3.0
EndStatestring

The state that indicates the last operation performed for the stress testing task. Valid values:

  • WAIT_TARGET: prepares the destination instance.
  • WAIT_DBGATEWAY: prepares the DBGateway.
  • WAIT_SQL: prepares the full SQL statistics.
  • WAIT_LOGIC: prepares to replay the traffic.
Note When the state of a stress testing task changes to the state that is specified by the EndState parameter, the stress testing task is complete.
WAIT_TARGET
SrcInstanceUuidstring

The UUID of the source instance.

hdm_3063db6792965c080a4bcb6e6304****
ClientTypestring

The type of the stress testing client. Valid values:

  • ECS: indicates that you must prepare the DBGateway.
  • DAS_ECS: indicates that DAS automatically purchases and deploys an ECS instance for stress testing.
ECS
Statestring

The state that indicates the operation performed for the stress testing task. Valid values:

  • WAIT_TARGET: prepares the destination instance.
  • WAIT_DBGATEWAY: prepares the DBGateway.
  • WAIT_SQL: prepares the full SQL statistics.
  • WAIT_LOGIC: prepares to replay the traffic.
WAIT_TARGET
DstIpstring

The reserved parameter.

None
SrcPublicIpstring

The reserved parameter.

None
BackupIdstring

The ID of the backup set. You can call the DescribeBackups operation to query the ID of the backup set.

229132
SqlCompleteReusestring

The reused information about the analysis result of full SQL statistics.

{"sqlUuid":"task_a37d2f07-45cb-4413-a2a6-c66c68****","metaUuid":"task_211e2561-5c0c-486b-864c-56b511****","sqlFile":"cl-1620057600000-1800626.sc","metaFile":"cl-1620057600000-1800626.meta"}
SmartPressureTimeinteger

The duration of the stress testing task of the smart pressure test type. Unit: millisecond.

86400000
ArchiveStateinteger

The archiving status of the file that stores the analysis result of full SQL statistics. Valid values:

  • 0: The file archiving is not started.
  • 1: The file is archived.
  • 2: An error occurred.
  • 3: The file is being archived.
  • 4: The archived file does not need to be downloaded.
1
Statusstring

The status of the stress testing task. Valid values:

  • SUCCESS: The task was successful.
  • IGNORED: The task was ignored.
  • RUNNING: The task is running.
  • EXCEPTION: The task is abnormal.
RUNNING
WorkDirstring

The path of the temporary directory that is generated for stress testing.

/tmp/bench/
ArchiveOssTableNamestring

The name of the table that was archived to Object Storage Service (OSS).

custins15546355_161604665****
DtsJobIdstring

The ID of the DTS migration task.

i03e3zty16i****
DtsJobStateinteger

The status of the DTS migration task. Valid values:

  • NOT_STARTED: The task is not started.
  • PRE_CHECKING: The task is in precheck.
  • PRE_CHECK_FAILED: The precheck failed.
  • CHECKING: The task is being checked.
  • MIGRATING: The data is being migrated.
  • CATCHED: The data is migrated from the source instance to the destination instance.
  • SUSPENDING: The task is suspended.
  • MIGRATION_FAILED: The data failed to be migrated.
  • FINISHED: The task is complete.
  • INITIALIZING: The synchronization is being initialized.
  • INITIALIZE_FAILED: The synchronization failed to be initialized.
  • SYNCHRONIZING: The data is being synchronized.
  • MODIFYING: The roles of the instances are being changed.
  • SWITCHING: The roles of the instances are being switched.
  • FAILED: The task failed.
CHECKING
DstPortinteger

The port number of the destination instance.

3306
DtsJobClassstring

The specification of the DTS instance.

Note For more information about the specifications of DTS instances and the test performance of each instance, see Specifications of data migration instances.
medium
ClientGatewayIdstring

The DBGateway ID of the stress testing client.

58598b2af48a0193dfc16fc6964ef****
Descriptionstring

The description of the stress testing task.

test-das-bench-0501
ErrorCodestring

The error code returned for the substep of the stress testing task.

10109
TableSchemastring

The name of the table that is used for stress testing.

[{"TABLE_NAME":"customer1","TABLE_SCHEMA":"tpcc"}]
DtsJobStatusstring

The status of the DTS migration task. Valid values:

  • NOT_STARTED: The task is not started.
  • PRE_CHECKING: The task is in precheck.
  • PRE_CHECK_FAILED: The precheck failed.
  • CHECKING: The task is being checked.
  • MIGRATING: The data is being migrated.
  • CATCHED: The data is migrated from the source instance to the destination instance.
  • SUSPENDING: The task is suspended.
  • MIGRATION_FAILED: The data failed to be migrated.
  • FINISHED: The task is complete.
  • INITIALIZING: The synchronization is being initialized.
  • INITIALIZE_FAILED: The synchronization failed to be initialized.
  • SYNCHRONIZING: The data is being synchronized.
  • MODIFYING: The roles of the instances are being changed.
  • SWITCHING: The roles of the instances are being switched.
  • FAILED: The task failed.
PRE_CHECK_FAILED
SrcInstanceAreastring

The database engine of the source instance. Valid values:

RDS
BenchStepStatusstring

The status that indicates the substep performed for the stress testing task. Valid values:

  • NEW: The task is being initialized.
  • RUNNING: The task is running.
  • FAILED: The task failed.
  • FINISHED: The task is complete.
  • Terminated: The task is terminated.
  • Deleted: The task is deleted.
FINISHED
Sourcestring

The source of the task. Valid values:

  • DAS
  • OPEN_API
DAS
ArchiveJobIdstring

The archiving task ID.

'202105211430070112231480820340758****
Topicstring

The topic that contains the consumed data. This topic is a topic in Message Queue for Apache Kafka.

das
RequestDurationlong

The duration of the stress testing task. Unit: millisecond.

86400000
TaskIdstring

The task ID.

e5cec704-0518-430f-8263-76f4dcds****
Rateinteger

The rate at which the stress testing task replayed the traffic. This value is a positive integer. Valid values: 0 to 30. Default value: 1.

1

Examples

Sample success responses

JSONformat

{
  "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_TO_RDS_MIGRATION",
          "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 codeError codeError message
400InvalidParamsThe request parameters are invalid.
403NoPermissionYou are not authorized to do this action.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history