mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
scheduler_perf: let the test decide which informers are needed
This will change when adding dynamic resource allocation test cases. Instead of changing mustSetupScheduler and StartScheduler for that, let's return the informer factory and create informers as needed in the test.
This commit is contained in:
@@ -750,7 +750,13 @@ func runWorkload(ctx context.Context, b *testing.B, tc *testCase, w *workload) [
|
||||
b.Fatalf("validate scheduler config file failed: %v", err)
|
||||
}
|
||||
}
|
||||
podInformer, client, dynClient := mustSetupScheduler(ctx, b, cfg)
|
||||
informerFactory, client, dynClient := mustSetupScheduler(ctx, b, cfg)
|
||||
|
||||
// Additional informers needed for testing. The pod informer was
|
||||
// already created before (scheduler.NewInformerFactory) and the
|
||||
// factory was started for it (mustSetupScheduler), therefore we don't
|
||||
// need to start again.
|
||||
podInformer := informerFactory.Core().V1().Pods()
|
||||
|
||||
var mu sync.Mutex
|
||||
var dataItems []DataItem
|
||||
|
||||
Reference in New Issue
Block a user