Merge pull request #130056 from saku3/fix-labelvalues-for-scheduler-perf

Fix labelValues for scheduler-perf
This commit is contained in:
Kubernetes Prow Robot 2025-02-10 02:43:56 -08:00 committed by GitHub
commit 9e555875e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 18 deletions

View File

@ -140,25 +140,25 @@ var (
Metrics: map[string][]*labelValues{
"scheduler_framework_extension_point_duration_seconds": {
{
label: extensionPointsLabelName,
values: metrics.ExtentionPoints,
Label: extensionPointsLabelName,
Values: metrics.ExtentionPoints,
},
},
"scheduler_scheduling_attempt_duration_seconds": {
{
label: resultLabelName,
values: []string{metrics.ScheduledResult, metrics.UnschedulableResult, metrics.ErrorResult},
Label: resultLabelName,
Values: []string{metrics.ScheduledResult, metrics.UnschedulableResult, metrics.ErrorResult},
},
},
"scheduler_pod_scheduling_duration_seconds": nil,
"scheduler_plugin_execution_duration_seconds": {
{
label: pluginLabelName,
values: PluginNames,
Label: pluginLabelName,
Values: PluginNames,
},
{
label: extensionPointsLabelName,
values: metrics.ExtentionPoints,
Label: extensionPointsLabelName,
Values: metrics.ExtentionPoints,
},
},
},
@ -167,18 +167,18 @@ var (
qHintMetrics = map[string][]*labelValues{
"scheduler_queueing_hint_execution_duration_seconds": {
{
label: pluginLabelName,
values: PluginNames,
Label: pluginLabelName,
Values: PluginNames,
},
{
label: eventLabelName,
values: schedframework.AllClusterEventLabels(),
Label: eventLabelName,
Values: schedframework.AllClusterEventLabels(),
},
},
"scheduler_event_handling_duration_seconds": {
{
label: eventLabelName,
values: schedframework.AllClusterEventLabels(),
Label: eventLabelName,
Values: schedframework.AllClusterEventLabels(),
},
},
}

View File

@ -303,8 +303,8 @@ func dataFilename(destFile string) (string, error) {
}
type labelValues struct {
label string
values []string
Label string
Values []string
}
// metricsCollectorConfig is the config to be marshalled to YAML config file.
@ -380,13 +380,13 @@ func uniqueLVCombos(lvs []*labelValues) []map[string]string {
results := make([]map[string]string, 0)
current := lvs[0]
for _, value := range current.values {
for _, value := range current.Values {
for _, combo := range remainingCombos {
newCombo := make(map[string]string, len(combo)+1)
for k, v := range combo {
newCombo[k] = v
}
newCombo[current.label] = value
newCombo[current.Label] = value
results = append(results, newCombo)
}
}