k8s.io/perf-tests/clusterloader2@v0.0.0-20240304094227-64bdb12da87e/testing/load/modules/dns-performance-metrics.yaml (about)

     1  # Valid actions: "start", "gather"
     2  {{$action := .action}}
     3  
     4  {{$ENABLE_DNSTESTS := DefaultParam .CL2_ENABLE_DNSTESTS false}}
     5  # Guard the new DNS tests. Remove it once it's confirmed that it works on a subset of tests.
     6  {{$USE_ADVANCED_DNSTEST := DefaultParam .CL2_USE_ADVANCED_DNSTEST false}}
     7  # DNS test threshold parameters.
     8  {{$DNS_ERROR_PERC_THRESHOLD := DefaultParam .CL2_DNS_ERROR_PERC_THRESHOLD 0.1}}
     9  {{$DNS_LOOKUP_LATENCY_50_THRESHOLD := DefaultParam .CL2_DNS_LOOKUP_LATENCY_50_THRESHOLD 0.02}}
    10  {{$DNS_LOOKUP_LATENCY_99_THRESHOLD := DefaultParam .CL2_DNS_LOOKUP_LATENCY_99_THRESHOLD 0.1}}
    11  
    12  {{if and $ENABLE_DNSTESTS $USE_ADVANCED_DNSTEST}}
    13  steps:
    14  - name: "{{$action}}ing measurements"
    15    measurements:
    16    - Identifier: DNSPerformanceMetrics
    17      Method: GenericPrometheusQuery
    18      Params:
    19        action: {{$action}}
    20        metricName: DNS Performance
    21        metricVersion: v1
    22        unit: s
    23        enableViolations: true
    24        queries:
    25        - name: DNS Lookup Count
    26          query: sum(increase(dns_lookups_total[%v]))
    27        - name: DNS Timeout Count
    28          query: sum(increase(dns_timeouts_total[%v]))
    29        - name: DNS Error Count
    30          query: sum(increase(dns_errors_total[%v]))
    31        - name: DNS Error Percentage
    32          query: sum(increase(dns_errors_total[%v])) / sum(increase(dns_lookups_total[%v])) * 100
    33          threshold: {{$DNS_ERROR_PERC_THRESHOLD}}
    34        - name: DNS Lookup Latency - Perc50
    35          query: histogram_quantile(0.5, sum(rate(dns_lookup_latency_bucket[%v])) by (le))
    36          threshold: {{$DNS_LOOKUP_LATENCY_50_THRESHOLD}}
    37        - name: DNS Lookup Latency - Perc99
    38          query: histogram_quantile(0.99, sum(rate(dns_lookup_latency_bucket[%v])) by (le))
    39          threshold: {{$DNS_LOOKUP_LATENCY_99_THRESHOLD}}
    40  {{end}}