idCounter: 12686
workflow_id: 150094
nodes:
  - id: __START__
    type: start
    data:
      name: __START__
      inputs:
        - id: '4160'
          name: cluster_version
          kind: value
          value: v8.5.4
          type: String
          description: ''
          required: false
        - id: '232'
          name: threads
          kind: value
          value: '100'
          type: Integer
          description: ''
          required: true
        - id: '350'
          name: duration
          kind: value
          value: 5m
          type: String
          description: golang duration format
          required: true
        - id: '829'
          name: warehouses
          kind: value
          value: '1000'
          type: Integer
          description: clean database before and after perf testing
          required: true
        - id: '101'
          name: email
          kind: value
          value: fang.wan@pingcap.com
          type: String
          description: ''
          required: true
        - id: '6398'
          name: tidbcloud_org_id
          kind: value
          value: '1369847559692509562'
          type: String
          description: https://pingcap.feishu.cn/wiki/wikcnwsv4vC0EUAVPSBqixMygIb
          required: true
        - id: '6623'
          name: tidbcloud_project_id
          kind: value
          value: '1369847559694040594'
          type: String
          description: ''
          required: true
        - id: '10571'
          name: tiflash_replicas
          kind: value
          value: '1'
          type: Integer
          description: ''
          required: true
        - id: '11242'
          name: workload_node_memory
          kind: value
          value: 16Gi
          type: String
          description: ''
          required: true
        - id: '11308'
          name: workload_node_cpu
          kind: value
          value: 7000m
          type: String
          description: ''
          required: true
      outputs:
        - name: cluster_version
          type: String
          description: ''
          id: '11399'
        - name: threads
          type: Integer
          description: ''
          id: '11400'
        - name: duration
          type: String
          description: golang duration format
          id: '11401'
        - name: warehouses
          type: Integer
          description: clean database before and after perf testing
          id: '11402'
        - name: email
          type: String
          description: ''
          id: '11403'
        - name: tidbcloud_org_id
          type: String
          description: https://pingcap.feishu.cn/wiki/wikcnwsv4vC0EUAVPSBqixMygIb
          id: '11404'
        - name: tidbcloud_project_id
          type: String
          description: ''
          id: '11405'
        - name: tiflash_replicas
          type: Integer
          description: ''
          id: '11406'
        - name: workload_node_memory
          type: String
          description: ''
          id: '11407'
        - name: workload_node_cpu
          type: String
          description: ''
          id: '11408'
      spec: {}
    position:
      x: 12
      'y': 60
    measured:
      width: 800
      height: 954
    selected: false
    dragging: false
  - id: '19'
    type: test_case_call
    position:
      x: 2012
      'y': 12
    data:
      name: perftest_bench_dbaas_1
      inputs:
        - id: '20'
          name: testbed
          kind: reference
          value: ''
          type: Object
          subType: Testbed
          description: Reference to the testbed
          required: true
          fromOutput:
            node: tidbcloud_cluster_create
            parameter: testbed
        - id: '266'
          name: threads
          kind: reference
          value: ''
          type: Integer
          description: ''
          required: false
          fromOutput:
            node: __START__
            parameter: threads
        - id: '787'
          name: duration
          kind: reference
          value: ''
          type: String
          description: ''
          required: false
          fromOutput:
            node: __START__
            parameter: duration
        - id: '1371'
          name: warehouses
          kind: reference
          value: ''
          type: Integer
          description: ''
          required: false
          fromOutput:
            node: __START__
            parameter: warehouses
        - id: '159'
          name: email
          kind: reference
          value: ''
          type: String
          description: ''
          required: false
          fromOutput:
            node: __START__
            parameter: email
        - id: '10698'
          name: tiflash_replicas
          kind: reference
          value: ''
          type: Integer
          description: ''
          required: false
          fromOutput:
            node: __START__
            parameter: tiflash_replicas
      outputs:
        - name: CaseExecDuration
          description: 'testcase execution duration, eg: 10s'
          type: String
          id: '12685'
      spec:
        caseId: 3030027
        caseName: perftest_bench_dbaas
        arguments:
          - name: toolset
            type: RESOURCE
            resourceType: WORKLOAD_NODE
            value: benchtoolset
          - name: tc
            type: RESOURCE
            resourceType: TIDBCLOUD_CLUSTER
            value: tc
          - name: benchOptions
            type: STRING
            value: >-
              -tidb-globals "set global tidb_mem_quota_query=84825604096;"
              -description "CH-workload" -tiflash-replicas
              {{.inputs.tiflash_replicas}} -tpc-options "--ignore-error"
              -warehouses {{.inputs.warehouses}} -arch "amd64" -duration
              "{{.inputs.duration}}" -benchmark-id "710001" -threads
              "{{.inputs.threads}}" -bench-type "ch" -email "{{.inputs.email}}"
              -reset-env=true -prepare=false -workload-sleep=false
          - name: benchFixtures
            type: STRING
            value: ''
          - name: dsn
            type: STRING
            default: >-
              perfdata:g2dmtGjk@tcp(db.benchbot.pingcap.net:3306)/perfdata?charset=utf8mb4&parseTime=True&loc=Local
            value: >-
              perfdata:g2dmtGjk@tcp(db.benchbot.pingcap.net:3306)/perfdata?charset=utf8mb4&parseTime=True&loc=Local
      fastFail: false
    measured:
      width: 742
      height: 566
    selected: true
    dragging: false
  - id: '1796'
    type: testbed_create
    position:
      x: 1112
      'y': 21.5
    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
        - id: '11728'
          name: memory
          kind: reference
          value: ''
          type: String
          description: ''
          required: false
          fromOutput:
            node: __START__
            parameter: workload_node_memory
        - id: '11729'
          name: cpu
          kind: reference
          value: ''
          type: String
          description: ''
          required: false
          fromOutput:
            node: __START__
            parameter: workload_node_cpu
      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: '12676'
        - name: testbed.testbed_name
          type: String
          description: Name of the testbed
          id: '12677'
        - name: testbed.testbed_items
          type: Object
          description: Items of the testbed
          id: '12678'
        - name: testbed.resourcepool_name
          type: String
          description: Resource pool name
          id: '12679'
        - 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: '12680'
        - name: tc.private_endpoint
          type: String
          description: Private endpoint
          id: '12681'
        - name: tc.prometheus_url
          type: String
          description: Prometheus URL
          id: '12682'
        - name: benchtoolset
          type: Object
          subType: WORKLOAD_NODE
          description: Handler of the benchtoolset
          objectSchema:
            type: Object
            description: Handler of the benchtoolset
          id: '12683'
      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
                tiflash:
                  config: {}
                tikv:
                  config: |
                    memory-usage-limit = "36GB"

                    [storage.block-cache]
                    capacity = "21.6GB"
                version: {{.inputs.cluster_version}}
              connect: privatelink
              orgID: "{{.inputs.org_id}}"
              password: "12345678"
              projectID: "{{.inputs.project_id}}"
              provider: aws
              tidb:
                nodeProfileName: 8 vCPU, 32 GiB
                replicas: 2
              tiflash:
                nodeProfileName: 8 vCPU, 64 GiB
                replicas: 1
                storageSizeGi: 1000
              tikv:
                nodeProfileName: 8 vCPU, 32 GiB
                replicas: 3
                storageSizeGi: 1000
                storageType: standard
          - id: '4912'
            name: benchtoolset
            type: WORKLOAD_NODE
            spec: |-
              container:
                command:
                  - tail
                  - -f
                  - /dev/null
                image: 946646677266.dkr.ecr.us-west-2.amazonaws.com/perf_testing/bench-toolset:latest
                name: benchtoolset
                resources:
                  requests:
                    cpu: "{{.inputs.cpu}}"
                    memory: "{{.inputs.memory}}"
        testPlanTags:
          - service:benchbot
      fastFail: false
    measured:
      width: 718
      height: 733
    selected: false
edges:
  - id: __START__-1796-w1
    source: __START__
    sourceHandle: a
    target: '1796'
    type: custom
    targetHandle: w1
    data:
      type: OnCondition
      onConditions:
        - OnSuccess
      name: w1
  - source: '1796'
    sourceHandle: source
    target: '19'
    targetHandle: w1
    id: 1796-19-w1
    type: custom
    data:
      name: w1
      type: OnCondition
      onConditions:
        - OnSuccess
startNodeParams:
  - id: '4160'
    name: cluster_version
    type: String
    description: ''
    required: false
    value: v8.5.4
  - id: '232'
    name: threads
    type: Integer
    description: ''
    required: true
    value: '100'
  - id: '350'
    name: duration
    type: String
    description: golang duration format
    required: true
    value: 5m
  - id: '829'
    name: warehouses
    type: Integer
    description: clean database before and after perf testing
    required: true
    value: '1000'
  - id: '101'
    name: email
    type: String
    description: ''
    required: true
    value: fang.wan@pingcap.com
  - id: '6398'
    name: tidbcloud_org_id
    type: String
    description: https://pingcap.feishu.cn/wiki/wikcnwsv4vC0EUAVPSBqixMygIb
    required: true
    value: '1369847559692509562'
  - id: '6623'
    name: tidbcloud_project_id
    type: String
    description: ''
    required: true
    value: '1369847559694040594'
  - id: '10571'
    name: tiflash_replicas
    type: Integer
    description: ''
    required: true
    value: '1'
  - id: '11242'
    name: workload_node_memory
    type: String
    description: ''
    required: true
    value: 16Gi
  - id: '11308'
    name: workload_node_cpu
    type: String
    description: ''
    required: true
    value: 7000m
