k8s.io/perf-tests/clusterloader2@v0.0.0-20240304094227-64bdb12da87e/testing/list/config.yaml (about)

     1  # List benchmark
     2  {{$NODES_PER_NAMESPACE := DefaultParam .NODES_PER_NAMESPACE 5}}
     3  {{$namespaces := DivideInt .Nodes $NODES_PER_NAMESPACE}}
     4  {{$namespaceNumber := MaxInt $namespaces 2}}
     5  
     6  {{$configMapBytes := DefaultParam .CL2_LIST_CONFIG_MAP_BYTES 1000}}
     7  {{$configMapNumber := DefaultParam .CL2_LIST_CONFIG_MAP_NUMBER 300}}
     8  {{$configMapGroup := DefaultParam .CL2_LIST_CONFIG_MAP_GROUP "list-configmap"}}
     9  
    10  {{$secretBytes := DefaultParam .CL2_LIST_SECRET_BYTES 1000}}
    11  {{$secretNumber := DefaultParam .CL2_LIST_SECRET_NUMBER 300}}
    12  {{$secretGroup := DefaultParam .CL2_LIST_SECRET_GROUP "list-secret"}}
    13  
    14  {{$listReplicas := DefaultParam .CL2_LIST_BENCHMARK_PODS 1}}
    15  {{$inflight := DefaultParam .CL2_LIST_CONCURRENCY 1}}
    16  
    17  {{$listConfigMapsPodCpu := MultiplyInt $inflight (MultiplyInt (DivideInt $configMapBytes 1000) $configMapNumber)}}
    18  {{$listConfigMapsPodMemory := MultiplyInt $inflight (MultiplyInt (DivideInt $configMapBytes 1000) $configMapNumber)}}
    19  {{$listSecretsPodCpu := MultiplyInt $inflight (MultiplyInt (DivideInt $secretBytes 1000) $secretNumber)}}
    20  {{$listSecretsPodMemory := MultiplyInt $inflight (MultiplyInt (DivideInt $secretBytes 1000) $secretNumber)}}
    21  
    22  # CL2_LIST_BENCHMARK_POD_CPU and CL2_LIST_BENCHMARK_POD_MEMORY are expected to be an integer-only value.
    23  # We will append m (milicores) and Mi for them respectively.
    24  {{$namespacedPodCpu := DefaultParam .CL2_LIST_BENCHMARK_POD_CPU (MaxInt $listConfigMapsPodCpu $listSecretsPodCpu)}}
    25  {{$namespacedPodMemory := DefaultParam .CL2_LIST_BENCHMARK_POD_MEMORY (MaxInt $listConfigMapsPodMemory $listSecretsPodMemory)}}
    26  {{$clusterScopedPodCpu := MultiplyInt $namespaceNumber $namespacedPodCpu}}
    27  {{$clusterScopedPodMemory := MultiplyInt $namespaceNumber $namespacedPodMemory}}
    28  
    29  name: List benchmark
    30  namespace:
    31    number: {{$namespaceNumber}}
    32  tuningSets:
    33  - name: Sequence
    34    parallelismLimitedLoad:
    35      parallelismLimit: 10
    36  steps:
    37  - name: Setup namespace for list benchmark pods
    38    phases:
    39    - replicasPerNamespace: 1
    40      tuningSet: Sequence
    41      objectBundle:
    42      - basename: list-benchmark
    43        objectTemplatePath: namespace.yaml
    44  - name: Setup permissions
    45    phases:
    46    - replicasPerNamespace: 1
    47      tuningSet: Sequence
    48      objectBundle:
    49      - basename: list-clusterrole
    50        objectTemplatePath: clusterrole.yaml
    51    - replicasPerNamespace: 1
    52      tuningSet: Sequence
    53      objectBundle:
    54      - basename: list-clusterrolebinding
    55        objectTemplatePath: clusterrolebinding.yaml
    56    - namespaceRange:
    57        min: 1
    58        max: {{$namespaceNumber}}
    59      replicasPerNamespace: 1
    60      tuningSet: Sequence
    61      objectBundle:
    62      - basename: list-rolebinding
    63        objectTemplatePath: rolebinding.yaml
    64  
    65  - name: Create configmaps
    66    phases:
    67    - namespaceRange:
    68        min: 1
    69        max: {{$namespaceNumber}}
    70      tuningSet: Sequence
    71      replicasPerNamespace: {{$configMapNumber}}
    72      objectBundle:
    73      - basename: {{$configMapGroup}}
    74        objectTemplatePath: configmap.yaml
    75        templateFillMap:
    76          bytes: {{$configMapBytes}}
    77          group: {{$configMapGroup}}
    78    - namespaceRange:
    79        min: 1
    80        max: {{$namespaceNumber}}
    81      tuningSet: Sequence
    82      replicasPerNamespace: {{$secretNumber}}
    83      objectBundle:
    84      - basename: {{$secretGroup}}
    85        objectTemplatePath: secret.yaml
    86        templateFillMap:
    87          bytes: {{$secretBytes}}
    88          group: {{$secretGroup}}
    89  
    90  - name: "Starting measurement - list benchmark"
    91    measurements:
    92    - Identifier: APIResponsivenessPrometheusSimple
    93      Method: APIResponsivenessPrometheus
    94      Params:
    95        action: start
    96        enableViolations: false
    97        useSimpleLatencyQuery: true
    98  
    99  - module:
   100      path: modules/list-benchmark.yaml
   101      params:
   102        namePrefix: "list-namespaced-configmaps-"
   103        replicas: {{$listReplicas}}
   104        inflight: {{$inflight}}
   105        uri: /api/v1/namespaces/%namespace%/configmaps
   106        cpu: {{$namespacedPodCpu}}m
   107        memory: {{$namespacedPodMemory}}Mi
   108        namespaced: true
   109        namespaceNumber: {{$namespaceNumber}}
   110  - module:
   111      path: modules/list-benchmark.yaml
   112      params:
   113        namePrefix: "list-cluster-scoped-configmaps-"
   114        replicas: {{$listReplicas}}
   115        inflight: {{$inflight}}
   116        uri: /api/v1/configmaps
   117        cpu: {{$clusterScopedPodCpu}}m
   118        memory: {{$clusterScopedPodMemory}}Mi
   119        namespaced: false
   120  - name: Wait 5 minutes
   121    measurements:
   122      - Identifier: Wait
   123        Method: Sleep
   124        Params:
   125          duration: 5m
   126  - module:
   127      path: modules/list-benchmark.yaml
   128      params:
   129        namePrefix: "list-namespaced-configmaps-"
   130        namespaced: true
   131        namespaceNumber: {{$namespaceNumber}}
   132        replicas: 0
   133  - module:
   134      path: modules/list-benchmark.yaml
   135      params:
   136        namePrefix: "list-cluster-scoped-configmaps-"
   137        replicas: 0
   138  
   139  - module:
   140      path: modules/list-benchmark.yaml
   141      params:
   142        namePrefix: "list-namespaced-secrets-"
   143        replicas: {{$listReplicas}}
   144        inflight: {{$inflight}}
   145        uri: /api/v1/namespaces/%namespace%/secrets
   146        cpu: {{$namespacedPodCpu}}m
   147        memory: {{$namespacedPodMemory}}Mi
   148        namespaced: true
   149        namespaceNumber: {{$namespaceNumber}}
   150  - module:
   151      path: modules/list-benchmark.yaml
   152      params:
   153        namePrefix: "list-cluster-scoped-secrets-"
   154        replicas: {{$listReplicas}}
   155        inflight: {{$inflight}}
   156        uri: /api/v1/secrets
   157        cpu: {{$clusterScopedPodCpu}}m
   158        memory: {{$clusterScopedPodMemory}}Mi
   159        namespaced: false
   160  - name: Wait 5 minutes
   161    measurements:
   162      - Identifier: Wait
   163        Method: Sleep
   164        Params:
   165          duration: 5m
   166  - module:
   167      path: modules/list-benchmark.yaml
   168      params:
   169        namePrefix: "list-namespaced-secrets-"
   170        namespaced: true
   171        namespaceNumber: {{$namespaceNumber}}
   172        replicas: 0
   173  - module:
   174      path: modules/list-benchmark.yaml
   175      params:
   176        namePrefix: "list-cluster-scoped-secrets-"
   177        replicas: 0
   178  
   179  - name: deleting namespace for list benchmark pods
   180    phases:
   181    - replicasPerNamespace: 0
   182      tuningSet: Sequence
   183      objectBundle:
   184      - basename: list-benchmark
   185        objectTemplatePath: namespace.yaml
   186  
   187  - name: "Gathering measurement - list benchmark"
   188    measurements:
   189    - Identifier: APIResponsivenessPrometheusSimple
   190      Method: APIResponsivenessPrometheus
   191      Params:
   192        action: gather
   193        enableViolations: false
   194        useSimpleLatencyQuery: true