|
| 1 | +rule_files: |
| 2 | +- ../prometheus_rules.yaml |
| 3 | + |
| 4 | +evaluation_interval: 1m |
| 5 | + |
| 6 | +tests: |
| 7 | +# Test scheduler_scheduling_attempt_duration_seconds quantile 0.5 |
| 8 | +- interval: 1m |
| 9 | + input_series: |
| 10 | + - series: 'scheduler_scheduling_attempt_duration_seconds_bucket{job="kube-scheduler",le="+Inf"}' |
| 11 | + values: '0+60x5' |
| 12 | + - series: 'scheduler_scheduling_attempt_duration_seconds_bucket{job="kube-scheduler",le="1"}' |
| 13 | + values: '0+60x5' |
| 14 | + promql_expr_test: |
| 15 | + - eval_time: 5m |
| 16 | + expr: cluster_quantile:scheduler_scheduling_attempt_duration_seconds:histogram_quantile{quantile="0.5"} |
| 17 | + exp_samples: |
| 18 | + - value: 0.5 |
| 19 | + labels: 'cluster_quantile:scheduler_scheduling_attempt_duration_seconds:histogram_quantile{job="kube-scheduler",quantile="0.5"}' |
| 20 | + |
| 21 | +# Test scheduler_scheduling_attempt_duration_seconds quantile 0.9 |
| 22 | +- interval: 1m |
| 23 | + input_series: |
| 24 | + - series: 'scheduler_scheduling_attempt_duration_seconds_bucket{job="kube-scheduler",le="+Inf"}' |
| 25 | + values: '0+60x5' |
| 26 | + - series: 'scheduler_scheduling_attempt_duration_seconds_bucket{job="kube-scheduler",le="1"}' |
| 27 | + values: '0+60x5' |
| 28 | + promql_expr_test: |
| 29 | + - eval_time: 5m |
| 30 | + expr: cluster_quantile:scheduler_scheduling_attempt_duration_seconds:histogram_quantile{quantile="0.9"} |
| 31 | + exp_samples: |
| 32 | + - value: 0.9 |
| 33 | + labels: 'cluster_quantile:scheduler_scheduling_attempt_duration_seconds:histogram_quantile{job="kube-scheduler",quantile="0.9"}' |
| 34 | + |
| 35 | +# Test scheduler_scheduling_attempt_duration_seconds quantile 0.99 |
| 36 | +- interval: 1m |
| 37 | + input_series: |
| 38 | + - series: 'scheduler_scheduling_attempt_duration_seconds_bucket{job="kube-scheduler",le="+Inf"}' |
| 39 | + values: '0+60x5' |
| 40 | + - series: 'scheduler_scheduling_attempt_duration_seconds_bucket{job="kube-scheduler",le="1"}' |
| 41 | + values: '0+60x5' |
| 42 | + promql_expr_test: |
| 43 | + - eval_time: 5m |
| 44 | + expr: cluster_quantile:scheduler_scheduling_attempt_duration_seconds:histogram_quantile{quantile="0.99"} |
| 45 | + exp_samples: |
| 46 | + - value: 0.99 |
| 47 | + labels: 'cluster_quantile:scheduler_scheduling_attempt_duration_seconds:histogram_quantile{job="kube-scheduler",quantile="0.99"}' |
| 48 | + |
| 49 | +# Test scheduler_scheduling_algorithm_duration_seconds quantile 0.5 |
| 50 | +- interval: 1m |
| 51 | + input_series: |
| 52 | + - series: 'scheduler_scheduling_algorithm_duration_seconds_bucket{job="kube-scheduler",le="+Inf"}' |
| 53 | + values: '0+60x5' |
| 54 | + - series: 'scheduler_scheduling_algorithm_duration_seconds_bucket{job="kube-scheduler",le="1"}' |
| 55 | + values: '0+60x5' |
| 56 | + promql_expr_test: |
| 57 | + - eval_time: 5m |
| 58 | + expr: cluster_quantile:scheduler_scheduling_algorithm_duration_seconds:histogram_quantile{quantile="0.5"} |
| 59 | + exp_samples: |
| 60 | + - value: 0.5 |
| 61 | + labels: 'cluster_quantile:scheduler_scheduling_algorithm_duration_seconds:histogram_quantile{job="kube-scheduler",quantile="0.5"}' |
| 62 | + |
| 63 | +# Test scheduler_scheduling_algorithm_duration_seconds quantile 0.9 |
| 64 | +- interval: 1m |
| 65 | + input_series: |
| 66 | + - series: 'scheduler_scheduling_algorithm_duration_seconds_bucket{job="kube-scheduler",le="+Inf"}' |
| 67 | + values: '0+60x5' |
| 68 | + - series: 'scheduler_scheduling_algorithm_duration_seconds_bucket{job="kube-scheduler",le="1"}' |
| 69 | + values: '0+60x5' |
| 70 | + promql_expr_test: |
| 71 | + - eval_time: 5m |
| 72 | + expr: cluster_quantile:scheduler_scheduling_algorithm_duration_seconds:histogram_quantile{quantile="0.9"} |
| 73 | + exp_samples: |
| 74 | + - value: 0.9 |
| 75 | + labels: 'cluster_quantile:scheduler_scheduling_algorithm_duration_seconds:histogram_quantile{job="kube-scheduler",quantile="0.9"}' |
| 76 | + |
| 77 | +# Test scheduler_scheduling_algorithm_duration_seconds quantile 0.99 |
| 78 | +- interval: 1m |
| 79 | + input_series: |
| 80 | + - series: 'scheduler_scheduling_algorithm_duration_seconds_bucket{job="kube-scheduler",le="+Inf"}' |
| 81 | + values: '0+60x5' |
| 82 | + - series: 'scheduler_scheduling_algorithm_duration_seconds_bucket{job="kube-scheduler",le="1"}' |
| 83 | + values: '0+60x5' |
| 84 | + promql_expr_test: |
| 85 | + - eval_time: 5m |
| 86 | + expr: cluster_quantile:scheduler_scheduling_algorithm_duration_seconds:histogram_quantile{quantile="0.99"} |
| 87 | + exp_samples: |
| 88 | + - value: 0.99 |
| 89 | + labels: 'cluster_quantile:scheduler_scheduling_algorithm_duration_seconds:histogram_quantile{job="kube-scheduler",quantile="0.99"}' |
| 90 | + |
| 91 | +# Test scheduler_binding_duration_seconds quantile 0.5 |
| 92 | +- interval: 1m |
| 93 | + input_series: |
| 94 | + - series: 'scheduler_binding_duration_seconds_bucket{job="kube-scheduler",le="+Inf"}' |
| 95 | + values: '0+60x5' |
| 96 | + - series: 'scheduler_binding_duration_seconds_bucket{job="kube-scheduler",le="1"}' |
| 97 | + values: '0+60x5' |
| 98 | + promql_expr_test: |
| 99 | + - eval_time: 5m |
| 100 | + expr: cluster_quantile:scheduler_binding_duration_seconds:histogram_quantile{quantile="0.5"} |
| 101 | + exp_samples: |
| 102 | + - value: 0.5 |
| 103 | + labels: 'cluster_quantile:scheduler_binding_duration_seconds:histogram_quantile{job="kube-scheduler",quantile="0.5"}' |
| 104 | + |
| 105 | +# Test scheduler_binding_duration_seconds quantile 0.9 |
| 106 | +- interval: 1m |
| 107 | + input_series: |
| 108 | + - series: 'scheduler_binding_duration_seconds_bucket{job="kube-scheduler",le="+Inf"}' |
| 109 | + values: '0+60x5' |
| 110 | + - series: 'scheduler_binding_duration_seconds_bucket{job="kube-scheduler",le="1"}' |
| 111 | + values: '0+60x5' |
| 112 | + promql_expr_test: |
| 113 | + - eval_time: 5m |
| 114 | + expr: cluster_quantile:scheduler_binding_duration_seconds:histogram_quantile{quantile="0.9"} |
| 115 | + exp_samples: |
| 116 | + - value: 0.9 |
| 117 | + labels: 'cluster_quantile:scheduler_binding_duration_seconds:histogram_quantile{job="kube-scheduler",quantile="0.9"}' |
| 118 | + |
| 119 | +# Test scheduler_binding_duration_seconds quantile 0.99 |
| 120 | +- interval: 1m |
| 121 | + input_series: |
| 122 | + - series: 'scheduler_binding_duration_seconds_bucket{job="kube-scheduler",le="+Inf"}' |
| 123 | + values: '0+60x5' |
| 124 | + - series: 'scheduler_binding_duration_seconds_bucket{job="kube-scheduler",le="1"}' |
| 125 | + values: '0+60x5' |
| 126 | + promql_expr_test: |
| 127 | + - eval_time: 5m |
| 128 | + expr: cluster_quantile:scheduler_binding_duration_seconds:histogram_quantile{quantile="0.99"} |
| 129 | + exp_samples: |
| 130 | + - value: 0.99 |
| 131 | + labels: 'cluster_quantile:scheduler_binding_duration_seconds:histogram_quantile{job="kube-scheduler",quantile="0.99"}' |
0 commit comments