fix labelvalues for scheduler-perf

This commit is contained in:
Yusuke Sakurai 2025-02-10 10:00:52 +09:00
parent 69ab91a5c5
commit 5d278c138c
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)
}
}