Queries stress testing tasks.

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

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeCloudBenchTasks

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

Status String No SUCCESS

The task status. Valid values:

  • SUCCESS: The tasks were successful.
  • IGNORED: The tasks were ignored.
  • RUNNING: The tasks are running.
  • EXCEPTION: The tasks failed.
TaskType String No pressure test

The type of the stress testing tasks. Default value: pressure test. Valid values:

  • pressure test: A task of this type replays traffic captured from the source instance on the destination instance at the maximum playback speed supported by the destination instance.
  • 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 and the distribution of the traffic generated on the destination instance are nearly identical to those originally on the source instance. Stress testing tasks of this type help you reduce the time consumed to collect data from the source instance and decrease storage costs and performance overheads.
StartTime String No 1596177993000

The beginning of the time range to query. Specify the UNIX timestamp in milliseconds.

EndTime String No 1596177993001

The end of the time range to query. Specify the UNIX timestamp in milliseconds.

Note The value specified for the EndTime parameter must be later than that specified for the StartTime parameter.
PageNo String No 1

The number of the page to return. The specified value must be a positive integer that does not exceed the maximum value of the INTEGER data type. Default value: 1.

PageSize String No 10

The maximum number of entries to return on each page. The specified value must be a positive integer that does not exceed the maximum value of the INTEGER data type. Default value: 10.

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 was successful, Successful was returned. If the request failed, an error message such as an error code was returned.
RequestId String B6D17591-B48B-4D31-9CD6-9B9796B2****

The ID of the request.

Success String true

Indicates whether the request was successful. Valid values:

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

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

PageNo Integer 1

The number of the returned page.

PageSize Integer 10

The maximum number of entries returned on each page.

Extra String None

A hidden parameter.

Total Long 2

The total number of entries returned.

List Array of cloudbenchTasks

The list of detailed information about the stress testing task.

cloudbenchTasks
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 if the task failed.

External String Null

Other information.

BackupType String TIMESTAMP

The backup method. Valid values:

  • TIMESTAMP: Data was restored to the state at a specific point in time.
  • BACKUPID: Data was restored from a backup set identified by a specified ID.
UserId String 1091411816252****

The ID of the Alibaba Cloud account.

DstType String Instance

The identifier used to specify the destination instance. Default value: Instance. Valid values:

  • Instance: the ID of the instance.
  • 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. Default value: pressure test. Valid values:

  • pressure test: A task of this type replays traffic captured from the source instance on the destination instance at the maximum playback speed supported by the destination instance.
  • 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 and the distribution of the traffic generated on the destination instance are nearly identical to those originally on the source instance. Stress testing tasks of this type help you reduce the time consumed to collect data from the source instance and decrease storage costs and performance overheads.
BenchStep String PROCEED

The substep that the stress testing task is performing. Valid values:

  • NEW: Initialize the 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 security groups.
  • ARCHIVIE: 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 functionality.
  • PRESSURE: Start the performance stress testing.
Version String V3.0

The version of the stress testing task. Valid values:

  • V2.0
  • V3.0
EndState String WAIT_TARGET

The state that indicates the end of the stress testing task. Valid values:

  • WAIT_TARGET: Preparing the destination instance.
  • WAIT_DBGATEWAY: Preparing the DBGateway.
  • WAIT_SQL: Preparing for full SQL statistics.
  • WAIT_LOGIC: Preparing for traffic playback.
Note When the status of a stress testing task changes to the state specified by the EndState parameter, the stress testing task is completed.
SrcInstanceUuid String hdm_3063db6792965c080a4bcb6e6304****

The UUID of the source instance.

ClientType String ECS

The type of the stress testing client. Valid values:

  • ECS: If you set this parameter to ECS, you need to prepare the DBGateway.
  • DAS_ECS: If you set this parameter to DAS_ECS, DAS automatically purchases and deploys an Elastic Compute Service (ECS) instance for stress testing.
State String WAIT_TARGET

The status of the task. Valid values:

  • WAIT_TARGET: Preparing the destination instance.
  • WAIT_DBGATEWAY: Preparing the DBGateway.
  • WAIT_SQL: Preparing for full SQL statistics.
  • WAIT_LOGIC: Preparing for traffic playback.
DstIp String None

A hidden parameter.

SrcPublicIp String None

A hidden parameter.

BackupId String 229132

The ID of the backup set. To view the value of this parameter, you can call the DescribeBackups operation.

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

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

SmartPressureTime Integer 86400000

The duration within which the traffic generation stressing test takes effect. The value is a UNIX timestamp. Unit: milliseconds.

ArchiveState Integer 1

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

  • 0: The file archiving is not started.
  • 1: The file was archived.
  • 2: The file failed to be archived.
  • 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 was successful.
  • IGNORED: The task was ignored.
  • RUNNING: The task is running.
  • EXCEPTION: The task failed.
WorkDir String /tmp/bench/

The temporary directory generated for stress testing.

ArchiveOssTableName String custins15546355_161604665****

The name of 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: A precheck is being performed.
  • PRE_CHECK_FAILED: The precheck failed.
  • CHECKING: A check is being performed.
  • MIGRATING: The data is being migrated.
  • CATCHED: The data has been synchronized from the source instance to the destination instance.
  • SUSPENDING: The migration was suspended.
  • MIGRATION_FAILED: The migration failed.
  • FINISHED: The migration was 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 switched.
  • SWITCHING: The roles of the instances are being switched.
  • FAILED: The task failed.
DstPort Integer 3306

The port of the destination instance.

DtsJobClass String medium

The specification of the DTS channel.

Note For more information about the performance testing of each specification, see Specifications of data synchronization instances.
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 10109

The error code returned by the internal task of the stress testing.

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

The name of the table used in the stress testing.

DtsJobStatus String PRE_CHECK_FAILED

The status of the DTS migration task. Valid values:

  • NOT_STARTED: The task is not started.
  • PRE_CHECKING: A precheck is being performed.
  • PRE_CHECK_FAILED: The precheck failed.
  • CHECKING: A check is being performed.
  • MIGRATING: The data is being migrated.
  • CATCHED: The data has been synchronized from the source instance to the destination instance.
  • SUSPENDING: The migration was suspended.
  • MIGRATION_FAILED: The migration failed.
  • FINISHED: The migration was 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 switched.
  • 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 substep status of the stress testing task. Valid values:

  • NEW: The task is being initialized.
  • RUNNING: The task is running.
  • FAILED: The task failed.
  • FINISHED: The migration was complete.
  • Terminated: The task was terminated.
  • Deleted: The task was deleted.
Source String DAS

The source of the task. Valid values:

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

The ID of the archive task.

Topic String das

The topic that contains the data to consume. The topic is a topic in Message Queue for Apache Kafka.

RequestDuration Long 86400000

The duration within which the stress testing task was performed. Unit: milliseconds.

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

The ID of the stress testing task.

Rate Integer 1

The rate at which the traffic captured from the source instance is replayed on the destination instance. The value must be a positive integer. Valid values: 1 to 30. Default value: 1.

Examples

Sample requests

http(s)://das.cn-shanghai.aliyuncs.com/?Action=DescribeCloudBenchTasks
&Status=SUCCESS
&TaskType=pressure test
&StartTime=1596177993000
&EndTime=1596177993001
&PageNo=1
&PageSize=10
&<Common request parameters>

Sample success responses

XML format

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

<DescribeCloudBenchTasksResponse>
    <Code>200</Code>
    <Message>Successful</Message>
    <RequestId>B6D17591-B48B-4D31-9CD6-9B9796B2****</RequestId>
    <Success>true</Success>
    <Data>
        <PageNo>1</PageNo>
        <PageSize>10</PageSize>
        <Extra>None</Extra>
        <Total>2</Total>
        <List>
            <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>1091411816252****</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_TARGET</EndState>
            <SrcInstanceUuid>hdm_3063db6792965c080a4bcb6e6304****</SrcInstanceUuid>
            <ClientType>ECS</ClientType>
            <State>WAIT_TARGET</State>
            <DstIp>None</DstIp>
            <SrcPublicIp>None</SrcPublicIp>
            <BackupId>229132</BackupId>
            <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"}</SqlCompleteReuse>
            <SmartPressureTime>86400000</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>10109</ErrorCode>
            <TableSchema>[{"TABLE_NAME":"customer1","TABLE_SCHEMA":"tpcc"}]</TableSchema>
            <DtsJobStatus>PRE_CHECK_FAILED</DtsJobStatus>
            <SrcInstanceArea>RDS</SrcInstanceArea>
            <BenchStepStatus>FINISHED</BenchStepStatus>
            <Source>DAS</Source>
            <ArchiveJobId>'202105211430070112231480820340758****</ArchiveJobId>
            <Topic>das</Topic>
            <RequestDuration>86400000</RequestDuration>
            <TaskId>e5cec704-0518-430f-8263-76f4dcds****</TaskId>
            <Rate>1</Rate>
        </List>
    </Data>
</DescribeCloudBenchTasksResponse>

JSON format

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

{
  "Code" : "200",
  "Message" : "Successful",
  "RequestId" : "B6D17591-B48B-4D31-9CD6-9B9796B2****",
  "Success" : "true",
  "Data" : {
    "PageNo" : 1,
    "PageSize" : 10,
    "Extra" : "None",
    "Total" : 2,
    "List" : [ {
      "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****",
      "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

HttpCode Error code Error message Description
400 InvalidParams The request parameters are invalid. The error message returned because the specified request parameters are invalid.

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