idCounter: 1236
workflow_id: 210001
nodes:
  - id: __START__
    type: start
    data:
      name: __START__
      inputs:
        - id: '1'
          name: cluster_version
          kind: value
          value: v8.5.4
          type: String
          description: The name of the testbed
          required: true
        - id: '41'
          name: tidbcloud_org_id
          kind: value
          value: '1369847559692509562'
          type: String
          description: ''
          required: true
        - id: '54'
          name: tidbcloud_project_id
          kind: value
          value: '1369847559694040594'
          type: String
          description: ''
          required: true
      outputs:
        - name: cluster_version
          type: String
          description: The name of the testbed
          id: '866'
        - name: tidbcloud_org_id
          type: String
          description: ''
          id: '867'
        - name: tidbcloud_project_id
          type: String
          description: ''
          id: '868'
      spec: {}
    position:
      x: 12
      'y': 79
    measured:
      width: 800
      height: 492
    selected: false
  - id: '10'
    type: testbed_create
    position:
      x: 1086.62248113445
      'y': 17.075503773109972
    data:
      name: tidbcloud_cluster_create
      inputs:
        - id: '1855'
          name: cluster_version
          kind: reference
          value: ''
          type: String
          description: ''
          required: false
          fromOutput:
            node: __START__
            parameter: cluster_version
        - id: '7143'
          name: org_id
          kind: reference
          value: ''
          type: String
          description: ''
          required: false
          fromOutput:
            node: __START__
            parameter: tidbcloud_org_id
        - id: '7144'
          name: project_id
          kind: reference
          value: ''
          type: String
          description: ''
          required: false
          fromOutput:
            node: __START__
            parameter: tidbcloud_project_id
      outputs:
        - name: testbed
          type: Object
          subType: Testbed
          description: Handler of the testbed
          objectSchema:
            type: Object
            description: Handler of the testbed
            properties:
              testbed_name:
                type: String
                description: Name of the testbed
              testbed_items:
                type: Object
                description: Items of the testbed
              resourcepool_name:
                type: String
                description: Resource pool name
          id: '1199'
        - name: testbed.testbed_name
          type: String
          description: Name of the testbed
          id: '1200'
        - name: testbed.testbed_items
          type: Object
          description: Items of the testbed
          id: '1201'
        - name: testbed.resourcepool_name
          type: String
          description: Resource pool name
          id: '1202'
        - name: tc
          type: Object
          subType: TIDBCLOUD_CLUSTER
          description: Handler of the tc
          objectSchema:
            type: Object
            description: Handler of the tc
            properties:
              private_endpoint:
                type: String
                description: Private endpoint
              prometheus_url:
                type: String
                description: Prometheus URL
          id: '1203'
        - name: tc.private_endpoint
          type: String
          description: Private endpoint
          id: '1204'
        - name: tc.prometheus_url
          type: String
          description: Prometheus URL
          id: '1205'
      spec:
        generateName: testbed
        resourcePool: eks-amd64-default
        reclaimPolicy:
          lease: 240h
          gcStrategy:
            onFailure:
              reserveEnv:
                durationOnWorkingHour: 1h
            onSuccess:
              reserveEnv:
                durationOnWorkingHour: 0h
        items:
          - id: '1797'
            name: tc
            type: TIDBCLOUD_CLUSTER
            spec: |-
              accountEmail: testinfra@pingcap.com
              clusterConfig:
                backup:
                  config: {}
                pd:
                  config: {}
                restore:
                  config: {}
                tidb:
                  config: null
                tikv:
                  config: {}
                version: {{.inputs.cluster_version}}
              connect: privatelink
              orgID: "{{.inputs.org_id}}"
              password: "12345678"
              projectID: "{{.inputs.project_id}}"
              provider: aws
              tidb:
                nodeProfileName: 2 vCPU, 8 GiB
                replicas: 1
              tikv:
                nodeProfileName: 2 vCPU, 8 GiB
                replicas: 3
                storageSizeGi: 1000
                storageType: standard
        testPlanTags:
          - service:benchbot
      fastFail: false
    measured:
      width: 693
      height: 626
    selected: false
    dragging: false
  - id: '35'
    type: ti_workload_call
    position:
      x: 2105
      'y': 112.5
    data:
      name: tpcc_1k_prepare
      inputs:
        - id: '36'
          name: tidb_cluster
          kind: reference
          value: ''
          type: Object
          subType: TIDBCLOUD_CLUSTER
          description: Handler to the tidb cluster
          required: true
          fromOutput:
            node: tidbcloud_cluster_create
            parameter: tc
        - id: '1196'
          name: cluster_version
          kind: reference
          value: ''
          type: String
          description: ''
          required: false
          fromOutput:
            node: __START__
            parameter: cluster_version
      outputs:
        - name: exec_id
          type: String
          description: TiWorkload Execution ID
          id: '1209'
        - name: exec_status
          type: String
          description: TiWorkload Execution Status
          id: '1210'
        - name: exec_tasks
          type: Object
          description: Tasks of the TiWorkload Execution
          id: '1211'
      spec:
        tiworkload_host: https://tiworkload.pingcap.net
        workload_name: tpcc
        prepare: |-
          params:
            thread: 100
            warehouses: 1000
            storage_url: |-
              s3://qa-workload-datasets/benchmark/tpcc-1k-with-clustered-index
            s3_endpoint: |-
              https://qa-workload-datasets.s3.us-west-2.amazonaws.com
            # db_name: Set name to restore TARGET DB / Empty to restore FULL CLUSTER .
            db_name: "tpcc"
            # br_options: You can set extra options like '--checksum-concurrency 128 --ddl-batch-size=32 --kespace=kespace-a --pitr-concurrency=128'
            br_options: '--check-requirements=false --concurrency=12 --tikv-max-restore-concurrency=16'
            # br_version: BR Version is recommended to be the same as the TiDB cluster version
            br_version: {{.inputs.cluster_version}}
            # br_base_image: BR Base Image is the image name used by Testbed to deploy BR. Leave empty to use the default image.
            br_base_image: 'gcr.io/pingcap-public/dbaas/br'
            # prepare_method: br_restore/sql_generate/import
            prepare_method: "br_restore"
            # supported_methods: br_restore,sql_generate,import
        db_port: 4000
        pd_port: 2379
        user_id: 240023
        cluster_type: tidbcloud_cluster
      fastFail: true
    measured:
      width: 701
      height: 464
    selected: false
    dragging: false
  - id: '87'
    type: ti_workload_call
    position:
      x: 1696.6457832349533
      'y': 747.7114603194193
    data:
      name: tpcc_1k_100th_2hrs
      inputs:
        - id: '614'
          name: tidb_cluster
          kind: reference
          value: ''
          type: Object
          subType: TIDBCLOUD_CLUSTER
          description: Handler to the tidb cluster
          required: true
          fromOutput:
            node: tidbcloud_cluster_create
            parameter: tc
      outputs:
        - name: exec_id
          type: String
          description: TiWorkload Execution ID
          id: '1215'
        - name: exec_status
          type: String
          description: TiWorkload Execution Status
          id: '1216'
        - name: exec_tasks
          type: Object
          description: Tasks of the TiWorkload Execution
          id: '1217'
      spec:
        tiworkload_host: https://tiworkload.pingcap.net
        workload_name: tpcc
        db_port: 4000
        pd_port: 2379
        user_id: 240023
        cluster_type: tidbcloud_cluster
        db_host: tc-tidb
        pd_host: tc-pd
        workload: |-
          params:
            # client_cnt: *[1, 10]* The number of clients to run the workload
            client_cnt: 1
            # client_resource: The resource of **per** client to run the workload
            client_resource: |-
              { "cpu": "15", "memory": "26Gi" }
            db_name: "tpcc"
            thread: 100
            # duration: Workload duration in minutes
            duration: 120
            # tpc_options: Extra go-tpc options, e.g. for tpcc workload, --ignore-error
            tpc_options: |-
              --ignore-error
            warehouses: 1000
      fastFail: true
    measured:
      width: 701
      height: 425
    selected: false
    dragging: false
  - id: '148'
    type: cluster_checker
    position:
      x: 8552.686085083751
      'y': 1422.7055743275732
    data:
      name: qps_metrics
      inputs:
        - id: '149'
          name: tidb_cluster
          kind: reference
          value: ''
          type: Object
          subType: TIDBCLOUD_CLUSTER
          description: Handler to the tidb cluster
          required: true
          fromOutput:
            node: tidbcloud_cluster_create
            parameter: tc
      outputs: []
      spec:
        mode: consistently
        fastFail: false
        pollInterval: 30s
        timeout: 240h
        warmupDuration: 30s
        rules:
          - name: Command Per Second
            customPromQLExpr: sum(rate(tidb_server_query_total{}[2m])) by (result)
            arguments: {}
        outputRules: []
      fastFail: false
    measured:
      width: 701
      height: 338
    selected: false
    dragging: false
  - id: '862'
    type: sleep
    position:
      x: -127.09590347106632
      'y': 1189.6661829329087
    data:
      name: sleep_after_prepare
      inputs: []
      outputs: []
      spec:
        duration: 20m
      fastFail: false
    measured:
      width: 600
      height: 108
    selected: false
    dragging: false
  - id: '896'
    type: sleep
    position:
      x: 2650.8907455038525
      'y': 908.2114603194193
    data:
      name: sleep_after_100th
      inputs: []
      outputs: []
      spec:
        duration: 10m
      fastFail: false
    measured:
      width: 600
      height: 108
    selected: false
    dragging: false
  - id: '897'
    type: ti_workload_call
    position:
      x: 3601.6457832349543
      'y': 748.3624678656392
    data:
      name: tpcc_1k_200th_2hrs
      inputs:
        - id: '898'
          name: tidb_cluster
          kind: reference
          value: ''
          type: Object
          optionalSubType:
            - TIDB_CLUSTER
            - TIDBCLOUD_CLUSTER
            - TIDBCLOUD_NEXTGEN_CLUSTER
            - TIDBCLOUD_SERVERLESS
          description: Handler to the tidb cluster
          required: true
          fromOutput:
            node: tidbcloud_cluster_create
            parameter: tc
          subType: TIDBCLOUD_CLUSTER
      outputs:
        - name: exec_id
          type: String
          description: TiWorkload Execution ID
          id: '1221'
        - name: exec_status
          type: String
          description: TiWorkload Execution Status
          id: '1222'
        - name: exec_tasks
          type: Object
          description: Tasks of the TiWorkload Execution
          id: '1223'
      spec:
        tiworkload_host: https://tiworkload.pingcap.net
        workload_name: tpcc
        workload: |-
          params:
            # client_cnt: *[1, 10]* The number of clients to run the workload
            client_cnt: 1
            # client_resource: The resource of **per** client to run the workload
            client_resource: |-
              { "cpu": "15", "memory": "26Gi" }
            db_name: "tpcc"
            thread: 200
            # duration: Workload duration in minutes
            duration: 120
            # tpc_options: Extra go-tpc options, e.g. for tpcc workload, --ignore-error
            tpc_options: |-
              --ignore-error
            warehouses: 1000
        db_port: 4000
        pd_port: 2379
        user_id: 240023
        cluster_type: tidbcloud_cluster
      fastFail: true
    measured:
      width: 701
      height: 425
    selected: false
    dragging: false
  - id: '923'
    type: sleep
    position:
      x: 4653.684385108923
      'y': 913.2869640925292
    data:
      name: sleep_after_200th
      inputs: []
      outputs: []
      spec:
        duration: 10m
      fastFail: false
    measured:
      width: 600
      height: 108
    selected: false
    dragging: false
  - id: '924'
    type: sleep
    position:
      x: 6544.816941705572
      'y': 938.6644829580791
    data:
      name: sleep_after_400th
      inputs: []
      outputs: []
      spec:
        duration: 10m
      fastFail: false
    measured:
      width: 600
      height: 108
    selected: false
    dragging: false
  - id: '937'
    type: ti_workload_call
    position:
      x: 5609.514926613133
      'y': 743.2869640925292
    data:
      name: tpcc_1k_400th_2hrs
      inputs:
        - id: '938'
          name: tidb_cluster
          kind: reference
          value: ''
          type: Object
          optionalSubType:
            - TIDB_CLUSTER
            - TIDBCLOUD_CLUSTER
            - TIDBCLOUD_NEXTGEN_CLUSTER
            - TIDBCLOUD_SERVERLESS
          description: Handler to the tidb cluster
          required: true
          fromOutput:
            node: tidbcloud_cluster_create
            parameter: tc
          subType: TIDBCLOUD_CLUSTER
      outputs:
        - name: exec_id
          type: String
          description: TiWorkload Execution ID
          id: '1227'
        - name: exec_status
          type: String
          description: TiWorkload Execution Status
          id: '1228'
        - name: exec_tasks
          type: Object
          description: Tasks of the TiWorkload Execution
          id: '1229'
      spec:
        tiworkload_host: https://tiworkload.pingcap.net
        workload_name: tpcc
        workload: |-
          params:
            # client_cnt: *[1, 10]* The number of clients to run the workload
            client_cnt: 1
            # client_resource: The resource of **per** client to run the workload
            client_resource: |-
              { "cpu": "15", "memory": "26Gi" }
            db_name: "tpcc"
            thread: 400
            # duration: Workload duration in minutes
            duration: 120
            # tpc_options: Extra go-tpc options, e.g. for tpcc workload, --ignore-error
            tpc_options: |-
              --ignore-error
            warehouses: 1000
        db_port: 4000
        pd_port: 2379
        user_id: 240023
        cluster_type: tidbcloud_cluster
      fastFail: false
    measured:
      width: 701
      height: 425
    selected: true
    dragging: false
  - id: '963'
    type: ti_workload_call
    position:
      x: 7623.728449707698
      'y': 799.117505596739
    data:
      name: tpcc_1k_800th_2hrs
      inputs:
        - id: '964'
          name: tidb_cluster
          kind: reference
          value: ''
          type: Object
          optionalSubType:
            - TIDB_CLUSTER
            - TIDBCLOUD_CLUSTER
            - TIDBCLOUD_NEXTGEN_CLUSTER
            - TIDBCLOUD_SERVERLESS
          description: Handler to the tidb cluster
          required: true
          fromOutput:
            node: tidbcloud_cluster_create
            parameter: tc
          subType: TIDBCLOUD_CLUSTER
      outputs:
        - name: exec_id
          type: String
          description: TiWorkload Execution ID
          id: '1233'
        - name: exec_status
          type: String
          description: TiWorkload Execution Status
          id: '1234'
        - name: exec_tasks
          type: Object
          description: Tasks of the TiWorkload Execution
          id: '1235'
      spec:
        tiworkload_host: https://tiworkload.pingcap.net
        workload_name: tpcc
        workload: |-
          params:
            # client_cnt: *[1, 10]* The number of clients to run the workload
            client_cnt: 1
            # client_resource: The resource of **per** client to run the workload
            client_resource: |-
              { "cpu": "15", "memory": "26Gi" }
            db_name: "tpcc"
            thread: 800
            # duration: Workload duration in minutes
            duration: 120
            # tpc_options: Extra go-tpc options, e.g. for tpcc workload, --ignore-error
            tpc_options: |-
              --ignore-error
            warehouses: 1000
        db_port: 4000
        pd_port: 2379
        user_id: 240023
        cluster_type: tidbcloud_cluster
      fastFail: true
    measured:
      width: 701
      height: 425
    selected: false
    dragging: false
edges:
  - source: __START__
    sourceHandle: a
    target: '10'
    targetHandle: w1
    id: __START__-10-w1
    type: custom
    data:
      name: w1
      type: OnCondition
      onConditions:
        - OnSuccess
    selected: false
  - id: 10-35-w1
    source: '10'
    sourceHandle: source
    target: '35'
    type: custom
    targetHandle: w1
    data:
      type: OnCondition
      onConditions:
        - OnSuccess
      name: w1
  - source: '963'
    sourceHandle: source
    target: '148'
    targetHandle: cancel
    id: 963-148-cancel
    type: custom
    data:
      name: cancel
      type: Cancel
      onConditions: []
  - source: '35'
    sourceHandle: source
    target: '862'
    targetHandle: w1
    id: 35-862-w1
    type: custom
    data:
      name: w1
      type: OnCondition
      onConditions:
        - OnSuccess
  - source: '862'
    sourceHandle: source
    target: '87'
    targetHandle: w1
    id: 862-87-w1
    type: custom
    data:
      name: w1
      type: OnCondition
      onConditions:
        - OnSuccess
  - source: '87'
    sourceHandle: source
    target: '896'
    targetHandle: w1
    id: 87-896-w1
    type: custom
    data:
      name: w1
      type: OnCondition
      onConditions:
        - OnSuccess
  - source: '896'
    sourceHandle: source
    target: '897'
    targetHandle: w1
    id: 896-897-w1
    type: custom
    data:
      name: w1
      type: OnCondition
      onConditions:
        - OnSuccess
  - source: '897'
    sourceHandle: source
    target: '923'
    targetHandle: w1
    id: 897-923-w1
    type: custom
    data:
      name: w1
      type: OnCondition
      onConditions:
        - OnSuccess
  - source: '923'
    sourceHandle: source
    target: '937'
    targetHandle: w1
    id: 923-937-w1
    type: custom
    data:
      name: w1
      type: OnCondition
      onConditions:
        - OnSuccess
  - source: '937'
    sourceHandle: source
    target: '924'
    targetHandle: w1
    id: 937-924-w1
    type: custom
    data:
      name: w1
      type: OnCondition
      onConditions:
        - OnSuccess
  - source: '924'
    sourceHandle: source
    target: '963'
    targetHandle: w1
    id: 924-963-w1
    type: custom
    data:
      name: w1
      type: OnCondition
      onConditions:
        - OnSuccess
  - source: '862'
    sourceHandle: source
    target: '148'
    targetHandle: w1
    id: 862-148-w1
    type: custom
    data:
      name: w1
      type: OnCondition
      onConditions:
        - OnSuccess
startNodeParams:
  - id: '1'
    name: cluster_version
    type: String
    description: The name of the testbed
    required: true
    value: v8.5.4
  - id: '41'
    name: tidbcloud_org_id
    type: String
    description: ''
    required: true
    value: '1369847559692509562'
  - id: '54'
    name: tidbcloud_project_id
    type: String
    description: ''
    required: true
    value: '1369847559694040594'
