mirror of
https://github.com/outbackdingo/kubernetes.git
synced 2026-01-27 10:19:35 +00:00
Add workload name to failed threshold log
This commit is contained in:
@@ -158,7 +158,7 @@ the ci-benchmark-scheduler-perf periodic job will fail with an error log such as
|
||||
```
|
||||
--- FAIL: BenchmarkPerfScheduling/SchedulingBasic/5000Nodes_10000Pods
|
||||
...
|
||||
scheduler_perf.go:1098: ERROR: op 2: expected SchedulingThroughput Average to be higher: got 256.12, want 270
|
||||
scheduler_perf.go:1098: ERROR: op 2: SchedulingBasic/5000Nodes_10000Pods/namespace-2: expected SchedulingThroughput Average to be higher: got 256.12, want 270
|
||||
```
|
||||
|
||||
This allows to analyze which workload failed. Make sure that the failure is not an outlier
|
||||
|
||||
@@ -943,9 +943,9 @@ func compareMetricWithThreshold(items []DataItem, threshold float64, metricSelec
|
||||
for _, item := range items {
|
||||
if item.Labels["Metric"] == metricSelector.Name && labelsMatch(item.Labels, metricSelector.Labels) && !valueWithinThreshold(item.Data["Average"], threshold, metricSelector.ExpectLower) {
|
||||
if metricSelector.ExpectLower {
|
||||
return fmt.Errorf("expected %s Average to be lower: got %f, want %f", metricSelector.Name, item.Data["Average"], threshold)
|
||||
return fmt.Errorf("%s: expected %s Average to be lower: got %f, want %f", item.Labels["Name"], metricSelector.Name, item.Data["Average"], threshold)
|
||||
}
|
||||
return fmt.Errorf("expected %s Average to be higher: got %f, want %f", metricSelector.Name, item.Data["Average"], threshold)
|
||||
return fmt.Errorf("%s: expected %s Average to be higher: got %f, want %f", item.Labels["Name"], metricSelector.Name, item.Data["Average"], threshold)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user