diff --git a/test/e2e/framework/resource_usage_gatherer.go b/test/e2e/framework/resource_usage_gatherer.go index ebfd80cb4e..d8b344a72e 100644 --- a/test/e2e/framework/resource_usage_gatherer.go +++ b/test/e2e/framework/resource_usage_gatherer.go @@ -205,6 +205,9 @@ func getKubemarkMasterComponentsResourceUsage() ResourceUsagePerContainer { } func (g *containerResourceGatherer) getKubeSystemContainersResourceUsage(c *client.Client) { + if len(g.workers) == 0 { + return + } delayPeriod := resourceDataGatheringPeriod / time.Duration(len(g.workers)) delay := time.Duration(0) for i := range g.workers {