mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
scheduler-perf: shorten "Name" label in metrics
Because the JSON file gets written at the end of the top-level benchmark, all data items had `BenchmarkPerfScheduling/` as prefix in the `Name` label. This is redundant and makes it harder to see the actual name. Now that common prefix gets removed.
This commit is contained in:
parent
8c33d3ef7b
commit
29e5771aa4
@ -996,7 +996,10 @@ func runWorkload(ctx context.Context, tb testing.TB, tc *testCase, w *workload,
|
||||
if concreteOp.CollectMetrics {
|
||||
collectorCtx, collectorCancel = context.WithCancel(ctx)
|
||||
defer collectorCancel()
|
||||
collectors = getTestDataCollectors(tb, podInformer, fmt.Sprintf("%s/%s", tb.Name(), namespace), namespace, tc.MetricsCollectorConfig, throughputErrorMargin)
|
||||
name := tb.Name()
|
||||
// The first part is the same for each work load, therefore we can strip it.
|
||||
name = name[strings.Index(name, "/")+1:]
|
||||
collectors = getTestDataCollectors(tb, podInformer, fmt.Sprintf("%s/%s", name, namespace), namespace, tc.MetricsCollectorConfig, throughputErrorMargin)
|
||||
for _, collector := range collectors {
|
||||
// Need loop-local variable for function below.
|
||||
collector := collector
|
||||
|
Loading…
Reference in New Issue
Block a user