mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 12:07:47 +00:00
Merge pull request #127267 from macsko/measure_evet_handling_and_qhints_duration_metrics_scheduler_perf
Measure event_handling and QHints duration metrics in scheduler_perf
This commit is contained in:
commit
1d3c003c8f
@ -98,6 +98,7 @@ const (
|
||||
extensionPointsLabelName = "extension_point"
|
||||
resultLabelName = "result"
|
||||
pluginLabelName = "plugin"
|
||||
eventLabelName = "event"
|
||||
)
|
||||
|
||||
// Run with -v=2, this is the default log level in production.
|
||||
@ -149,6 +150,22 @@ var (
|
||||
values: metrics.ExtentionPoints,
|
||||
},
|
||||
},
|
||||
"scheduler_queueing_hint_execution_duration_seconds": {
|
||||
{
|
||||
label: pluginLabelName,
|
||||
values: PluginNames,
|
||||
},
|
||||
{
|
||||
label: eventLabelName,
|
||||
values: clusterEventsToLabels(schedframework.AllEvents),
|
||||
},
|
||||
},
|
||||
"scheduler_event_handling_duration_seconds": {
|
||||
{
|
||||
label: eventLabelName,
|
||||
values: clusterEventsToLabels(schedframework.AllEvents),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -177,6 +194,14 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
func clusterEventsToLabels(events []schedframework.ClusterEvent) []string {
|
||||
labels := make([]string, 0, len(events))
|
||||
for _, event := range events {
|
||||
labels = append(labels, event.Label)
|
||||
}
|
||||
return labels
|
||||
}
|
||||
|
||||
// testCase defines a set of test cases that intends to test the performance of
|
||||
// similar workloads of varying sizes with shared overall settings such as
|
||||
// feature gates and metrics collected.
|
||||
@ -1038,10 +1063,7 @@ func compareMetricWithThreshold(items []DataItem, threshold float64, metricSelec
|
||||
}
|
||||
|
||||
func checkEmptyInFlightEvents() error {
|
||||
labels := []string{metrics.PodPoppedInFlightEvent}
|
||||
for _, event := range schedframework.AllEvents {
|
||||
labels = append(labels, event.Label)
|
||||
}
|
||||
labels := append(clusterEventsToLabels(schedframework.AllEvents), metrics.PodPoppedInFlightEvent)
|
||||
for _, label := range labels {
|
||||
value, err := testutil.GetGaugeMetricValue(metrics.InFlightEvents.WithLabelValues(label))
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user