Skip to content

Commit 9e55587

Browse files
authored
Merge pull request kubernetes#130056 from saku3/fix-labelvalues-for-scheduler-perf
Fix labelValues for scheduler-perf
2 parents b7c55c2 + 5d278c1 commit 9e55587

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

test/integration/scheduler_perf/scheduler_perf.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -140,25 +140,25 @@ var (
140140
Metrics: map[string][]*labelValues{
141141
"scheduler_framework_extension_point_duration_seconds": {
142142
{
143-
label: extensionPointsLabelName,
144-
values: metrics.ExtentionPoints,
143+
Label: extensionPointsLabelName,
144+
Values: metrics.ExtentionPoints,
145145
},
146146
},
147147
"scheduler_scheduling_attempt_duration_seconds": {
148148
{
149-
label: resultLabelName,
150-
values: []string{metrics.ScheduledResult, metrics.UnschedulableResult, metrics.ErrorResult},
149+
Label: resultLabelName,
150+
Values: []string{metrics.ScheduledResult, metrics.UnschedulableResult, metrics.ErrorResult},
151151
},
152152
},
153153
"scheduler_pod_scheduling_duration_seconds": nil,
154154
"scheduler_plugin_execution_duration_seconds": {
155155
{
156-
label: pluginLabelName,
157-
values: PluginNames,
156+
Label: pluginLabelName,
157+
Values: PluginNames,
158158
},
159159
{
160-
label: extensionPointsLabelName,
161-
values: metrics.ExtentionPoints,
160+
Label: extensionPointsLabelName,
161+
Values: metrics.ExtentionPoints,
162162
},
163163
},
164164
},
@@ -167,18 +167,18 @@ var (
167167
qHintMetrics = map[string][]*labelValues{
168168
"scheduler_queueing_hint_execution_duration_seconds": {
169169
{
170-
label: pluginLabelName,
171-
values: PluginNames,
170+
Label: pluginLabelName,
171+
Values: PluginNames,
172172
},
173173
{
174-
label: eventLabelName,
175-
values: schedframework.AllClusterEventLabels(),
174+
Label: eventLabelName,
175+
Values: schedframework.AllClusterEventLabels(),
176176
},
177177
},
178178
"scheduler_event_handling_duration_seconds": {
179179
{
180-
label: eventLabelName,
181-
values: schedframework.AllClusterEventLabels(),
180+
Label: eventLabelName,
181+
Values: schedframework.AllClusterEventLabels(),
182182
},
183183
},
184184
}

test/integration/scheduler_perf/util.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,8 @@ func dataFilename(destFile string) (string, error) {
303303
}
304304

305305
type labelValues struct {
306-
label string
307-
values []string
306+
Label string
307+
Values []string
308308
}
309309

310310
// metricsCollectorConfig is the config to be marshalled to YAML config file.
@@ -380,13 +380,13 @@ func uniqueLVCombos(lvs []*labelValues) []map[string]string {
380380
results := make([]map[string]string, 0)
381381

382382
current := lvs[0]
383-
for _, value := range current.values {
383+
for _, value := range current.Values {
384384
for _, combo := range remainingCombos {
385385
newCombo := make(map[string]string, len(combo)+1)
386386
for k, v := range combo {
387387
newCombo[k] = v
388388
}
389-
newCombo[current.label] = value
389+
newCombo[current.Label] = value
390390
results = append(results, newCombo)
391391
}
392392
}

0 commit comments

Comments
 (0)