Queries a stress testing task.

Database Autonomy Service (DAS) provides the intelligent stress testing feature. This feature checks whether your instance specifications need to be scaled up to efficiently handle workloads during peak hours. For more information, see Intelligent stress testing.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeCloudbenchTask

The operation that you want to perform. Set the value to DescribeCloudbenchTask.

TaskId String Yes e5cec704-0518-430f-8263-76f4dcds****

The ID of the stress testing task. You can call the DescribeCloudBenchTasks operation to query the ID.

Response parameters

Parameter Type Example Description
Code String 200

The returned status code.

Message String Successful

The message returned for the request.

Note If the request is successful, Successful is returned. If the request fails, an error message such as an error code is returned.
RequestId String B6D17591-B48B-4D31-9CD6-9B9796B2****

The ID of the request.

Success String true

Indicates whether the request is successful. Valid values:

  • true: The request is successful.
  • false: The request failed.
Data Object

The detailed information, including the error codes and the number of error messages.

DtsJobName String RDS_TO_RDS_MIGRATION

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

ErrorMessage String 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].

The error message returned when the stress testing task failed.

External String null

Other information.

BackupType String TIMESTAMP

The backup method. 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 a specified ID.
UserId String 109141182625****

The ID of the Alibaba Cloud account.

DstType String Instance

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

  • Instance: the ID of the instance. This is the default value.
  • ConnectionString: the URL of the instance.
EcsInstanceId String i-bp1ecr5go2go1****

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

DstInstanceUuid String hdm_d887b5ccf99fa0dc9a1e5aaac368****

The UUID of the destination instance.

TaskType String pressure test

The type of the stress testing task. Valid values:

  • pressure test: A task of this type replays traffic captured from the source instance on the destination instance at the maximum playback rate supported by the destination instance. This is the default value.
  • smart pressure test: A task of this type analyzes traffic 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 basically consistent with those on the source instance. Stress testing tasks of this type help you reduce the amount of time consumed to collect data from the source instance and decrease storage costs and performance overheads.
BenchStep String PROCEED

The substep in the stress testing task. Valid values:

  • NEW: initializes the stress testing task
  • WAIT_BUY_ECS: purchases an ECS instance
  • WAIT_START_ECS: starts the ECS instance
  • WAIT_INSTALL_JDK: installs the Java Development Kit (JDK)
  • WAIT_INSTALL_DBGATEWAY: installs the database gateway (DBGateway)
  • ADD_SECURITY_IPS_STEP: configures the security groups
  • ARCHIVIE: archives the full SQL statistics
  • DOWNLOAD: downloads the file that stores the analysis result of full SQL statistics
  • PROCEED: preprocesses the file that stores the analysis result of full SQL statistics
  • PRE_LOAD: preloads the file that stores the analysis result of full SQL statistics
  • VALIDATE: verifies the functionality of stress testing
  • PRESSURE: starts the stress testing task
Version String V3.0

The version of the stress testing task. Valid values:

  • V2.0
  • V3.0
EndState String WAIT_LOGIC

The status 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 status of a stress testing task changes to the state indicated by the EndState parameter, the stress testing task becomes completed.
SrcInstanceUuid String a364e414-e68b-4e5c-9166-65b3a153****

The UUID of the source instance.

ClientType String ECS

The type of the stress testing client. Valid values:

  • ECS: This value indicates that you must prepare the DBGateway.
  • DAS_ECS: This value indicates that DAS automatically purchases and deploys an ECS instance for stress testing.
State String WAIT_TARGET

The status 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
DstIp String None

A hidden parameter.

SrcPublicIp String None

A hidden parameter.

BackupId String 229132

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

SqlCompleteReuse String null

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

SmartPressureTime Integer 86400000

The duration of the stress testing task for which the traffic was generated on the destination instance. Unit: milliseconds.

ArchiveState Integer 1

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.
Status String RUNNING

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: An error occurred.
WorkDir String /tmp/bench/

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

ArchiveOssTableName String custins15546355_161604665****

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

DtsJobId String i03e3zty16i****

The ID of the DTS migration task.

DtsJobState Integer CHECKING

The status of the DTS migration task. Valid values:

  • NOT_STARTED: The task is not started.
  • PRE_CHECKING: The task is being prechecked.
  • PRE_CHECK_FAILED: The task failed to be prechecked.
  • 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 completed.
  • 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.
DstPort Integer 3306

The port number of the destination instance.

DtsJobClass String medium

The specification of the DTS migration task.

ClientGatewayId String 58598b2af48a0193dfc16fc6964ef****

The DBGateway ID of the stress testing client.

Description String test-das-bench-0501

The description of the stress testing task.

ErrorCode String 10910

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

TableSchema String [{"TABLE_NAME":"customer1","TABLE_SCHEMA":"tpcc"}]

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

DtsJobStatus String PRE_CHECKING

The status of the DTS migration task. Valid values:

  • NOT_STARTED: The task is not started.
  • PRE_CHECKING: The task is being prechecked.
  • PRE_CHECK_FAILED: The task failed to be prechecked.
  • 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 completed.
  • 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.
SrcInstanceArea String RDS

The database type of the source instance.

BenchStepStatus String FINISHED

The status that indicates the substep performed on 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 completed.
  • Terminated: The task is terminated.
  • Deleted: The task is deleted.
Source String DAS

The source of the task. Valid values:

  • DAS
  • OPEN_API
ArchiveJobId String '202105211430070112231480820340758****

The ID of the archiving task.

Topic String das

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

RequestDuration Long 864000

The duration of the stress testing task for which traffic was captured from the source instance.

TaskId String e5cec704-0518-430f-8263-76f4dcds****

The ID of the stress testing task.

Rate Long 1

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

Examples

Sample requests

http(s)://das.cn-shanghai.aliyuncs.com/?Action=DescribeCloudbenchTask
&TaskId=e5cec704-0518-430f-8263-76f4dcds****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeCloudbenchTaskResponse>
    <Code>200</Code>
    <Message>Successful</Message>
    <RequestId>B6D17591-B48B-4D31-9CD6-9B9796B2****</RequestId>
    <Success>true</Success>
    <Data>
        <DtsJobName>RDS_TO_RDS_MIGRATION</DtsJobName>
        <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].</ErrorMessage>
        <External>Null</External>
        <BackupType>TIMESTAMP</BackupType>
        <UserId>109141182625****</UserId>
        <DstType>Instance</DstType>
        <EcsInstanceId>i-bp1ecr5go2go1****</EcsInstanceId>
        <DstInstanceUuid>hdm_d887b5ccf99fa0dc9a1e5aaac368****</DstInstanceUuid>
        <TaskType>pressure test</TaskType>
        <BenchStep>PROCEED</BenchStep>
        <Version>V3.0</Version>
        <EndState>WAIT_LOGIC</EndState>
        <SrcInstanceUuid>a364e414-e68b-4e5c-9166-65b3a153****</SrcInstanceUuid>
        <ClientType>ECS</ClientType>
        <State>WAIT_TARGET</State>
        <DstIp>rm-2ze1jdv45i7l64r****.mysql.rds.aliyuncs.com</DstIp>
        <SrcPublicIp>rm-2ze1jdv45i7l64r****.mysql.rds.aliyuncs.com</SrcPublicIp>
        <BackupId>12345</BackupId>
        <SqlCompleteReuse>{"sqlUuid":"task_a37d2f07-45cb-****-a2a6-c66c62****","metaUuid":"task_211e2561-5c0c-486b-864c-56b511****","sqlFile":"cl-1620057600000-1800626.sc","metaFile":"cl-1620057600000-180****.meta"}</SqlCompleteReuse>
        <SmartPressureTime>864000</SmartPressureTime>
        <ArchiveState>1</ArchiveState>
        <Status>RUNNING</Status>
        <WorkDir>/tmp/bench/</WorkDir>
        <ArchiveOssTableName>custins15546355_161604665****</ArchiveOssTableName>
        <DtsJobId>i03e3zty16i****</DtsJobId>
        <DstPort>3306</DstPort>
        <DtsJobClass>medium</DtsJobClass>
        <ClientGatewayId>58598b2af48a0193dfc16fc6964ef****</ClientGatewayId>
        <Description>test-das-bench-0501</Description>
        <ErrorCode>10910</ErrorCode>
        <TableSchema>[{"TABLE_NAME":"customer1","TABLE_SCHEMA":"tpcc"}]</TableSchema>
        <DtsJobStatus>PRE_CHECKING</DtsJobStatus>
        <SrcInstanceArea>RDS</SrcInstanceArea>
        <BenchStepStatus>FINISHED</BenchStepStatus>
        <Source>DAS</Source>
        <ArchiveJobId>'202105211430070112231480820340758****</ArchiveJobId>
        <Topic>das</Topic>
        <RequestDuration>864000</RequestDuration>
        <TaskId>e5cec704-0518-430f-8263-76f4dcds****</TaskId>
        <Rate>1</Rate>
    </Data>
</DescribeCloudbenchTaskResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Code" : "200",
  "Message" : "Successful",
  "RequestId" : "B6D17591-B48B-4D31-9CD6-9B9796B2****",
  "Success" : "true",
  "Data" : {
    "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" : "109141182625****",
    "DstType" : "Instance",
    "EcsInstanceId" : "i-bp1ecr5go2go1****",
    "DstInstanceUuid" : "hdm_d887b5ccf99fa0dc9a1e5aaac368****",
    "TaskType" : "pressure test",
    "BenchStep" : "PROCEED",
    "Version" : "V3.0",
    "EndState" : "WAIT_LOGIC",
    "SrcInstanceUuid" : "a364e414-e68b-4e5c-9166-65b3a153****",
    "ClientType" : "ECS",
    "State" : "WAIT_TARGET",
    "DstIp" : "rm-2ze1jdv45i7l64r****.mysql.rds.aliyuncs.com",
    "SrcPublicIp" : "rm-2ze1jdv45i7l64r****.mysql.rds.aliyuncs.com",
    "BackupId" : "12345",
    "SqlCompleteReuse" : "{\"sqlUuid\":\"task_a37d2f07-45cb-****-a2a6-c66c62****\",\"metaUuid\":\"task_211e2561-5c0c-486b-864c-56b511****\",\"sqlFile\":\"cl-1620057600000-1800626.sc\",\"metaFile\":\"cl-1620057600000-180****.meta\"}",
    "SmartPressureTime" : 864000,
    "ArchiveState" : 1,
    "Status" : "RUNNING",
    "WorkDir" : "/tmp/bench/",
    "ArchiveOssTableName" : "custins15546355_161604665****",
    "DtsJobId" : "i03e3zty16i****",
    "DstPort" : 3306,
    "DtsJobClass" : "medium",
    "ClientGatewayId" : "58598b2af48a0193dfc16fc6964ef****",
    "Description" : "test-das-bench-0501",
    "ErrorCode" : "10910",
    "TableSchema" : "[{\"TABLE_NAME\":\"customer1\",\"TABLE_SCHEMA\":\"tpcc\"}]",
    "DtsJobStatus" : "PRE_CHECKING",
    "SrcInstanceArea" : "RDS",
    "BenchStepStatus" : "FINISHED",
    "Source" : "DAS",
    "ArchiveJobId" : "'202105211430070112231480820340758****",
    "Topic" : "das",
    "RequestDuration" : 864000,
    "TaskId" : "e5cec704-0518-430f-8263-76f4dcds****",
    "Rate" : 1
  }
}

Error codes

For a list of error codes, visit the API Error Center.