mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
fix labelvalues for scheduler-perf
This commit is contained in:
parent
69ab91a5c5
commit
5d278c138c
@ -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(),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user