mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30: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{
|
Metrics: map[string][]*labelValues{
|
||||||
"scheduler_framework_extension_point_duration_seconds": {
|
"scheduler_framework_extension_point_duration_seconds": {
|
||||||
{
|
{
|
||||||
label: extensionPointsLabelName,
|
Label: extensionPointsLabelName,
|
||||||
values: metrics.ExtentionPoints,
|
Values: metrics.ExtentionPoints,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"scheduler_scheduling_attempt_duration_seconds": {
|
"scheduler_scheduling_attempt_duration_seconds": {
|
||||||
{
|
{
|
||||||
label: resultLabelName,
|
Label: resultLabelName,
|
||||||
values: []string{metrics.ScheduledResult, metrics.UnschedulableResult, metrics.ErrorResult},
|
Values: []string{metrics.ScheduledResult, metrics.UnschedulableResult, metrics.ErrorResult},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"scheduler_pod_scheduling_duration_seconds": nil,
|
"scheduler_pod_scheduling_duration_seconds": nil,
|
||||||
"scheduler_plugin_execution_duration_seconds": {
|
"scheduler_plugin_execution_duration_seconds": {
|
||||||
{
|
{
|
||||||
label: pluginLabelName,
|
Label: pluginLabelName,
|
||||||
values: PluginNames,
|
Values: PluginNames,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: extensionPointsLabelName,
|
Label: extensionPointsLabelName,
|
||||||
values: metrics.ExtentionPoints,
|
Values: metrics.ExtentionPoints,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -167,18 +167,18 @@ var (
|
|||||||
qHintMetrics = map[string][]*labelValues{
|
qHintMetrics = map[string][]*labelValues{
|
||||||
"scheduler_queueing_hint_execution_duration_seconds": {
|
"scheduler_queueing_hint_execution_duration_seconds": {
|
||||||
{
|
{
|
||||||
label: pluginLabelName,
|
Label: pluginLabelName,
|
||||||
values: PluginNames,
|
Values: PluginNames,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: eventLabelName,
|
Label: eventLabelName,
|
||||||
values: schedframework.AllClusterEventLabels(),
|
Values: schedframework.AllClusterEventLabels(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"scheduler_event_handling_duration_seconds": {
|
"scheduler_event_handling_duration_seconds": {
|
||||||
{
|
{
|
||||||
label: eventLabelName,
|
Label: eventLabelName,
|
||||||
values: schedframework.AllClusterEventLabels(),
|
Values: schedframework.AllClusterEventLabels(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -303,8 +303,8 @@ func dataFilename(destFile string) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type labelValues struct {
|
type labelValues struct {
|
||||||
label string
|
Label string
|
||||||
values []string
|
Values []string
|
||||||
}
|
}
|
||||||
|
|
||||||
// metricsCollectorConfig is the config to be marshalled to YAML config file.
|
// 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)
|
results := make([]map[string]string, 0)
|
||||||
|
|
||||||
current := lvs[0]
|
current := lvs[0]
|
||||||
for _, value := range current.values {
|
for _, value := range current.Values {
|
||||||
for _, combo := range remainingCombos {
|
for _, combo := range remainingCombos {
|
||||||
newCombo := make(map[string]string, len(combo)+1)
|
newCombo := make(map[string]string, len(combo)+1)
|
||||||
for k, v := range combo {
|
for k, v := range combo {
|
||||||
newCombo[k] = v
|
newCombo[k] = v
|
||||||
}
|
}
|
||||||
newCombo[current.label] = value
|
newCombo[current.Label] = value
|
||||||
results = append(results, newCombo)
|
results = append(results, newCombo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user