mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 13:12:20 +00:00
Merge pull request #8809 from rrati/performance-gathering-7572
Performance gathering 7572
This commit is contained in:
@@ -149,7 +149,13 @@ func playWithRC(c *client.Client, wg *sync.WaitGroup, ns, name string, size int)
|
||||
// Once every 1-2 minutes perform scale of RC.
|
||||
for start := time.Now(); time.Since(start) < simulationTime; time.Sleep(time.Duration(60+rand.Intn(60)) * time.Second) {
|
||||
if !rcExist {
|
||||
expectNoError(RunRC(c, name, ns, image, size), fmt.Sprintf("creating rc %s in namespace %s", name, ns))
|
||||
config := RCConfig{Client: c,
|
||||
Name: name,
|
||||
Namespace: ns,
|
||||
Image: image,
|
||||
Replicas: size,
|
||||
}
|
||||
expectNoError(RunRC(config), fmt.Sprintf("creating rc %s in namespace %s", name, ns))
|
||||
rcExist = true
|
||||
}
|
||||
// Scale RC to a random size between 0.5x and 1.5x of the original size.
|
||||
@@ -187,7 +193,13 @@ func createRCGroup(c *client.Client, ns, groupName string, size, count, batchSiz
|
||||
defer GinkgoRecover()
|
||||
defer wg.Done()
|
||||
name := groupName + "-" + strconv.Itoa(i)
|
||||
expectNoError(RunRC(c, name, ns, image, size), fmt.Sprintf("creating rc %s in namespace %s for the first time", name, ns))
|
||||
config := RCConfig{Client: c,
|
||||
Name: name,
|
||||
Namespace: ns,
|
||||
Image: image,
|
||||
Replicas: size,
|
||||
}
|
||||
expectNoError(RunRC(config), fmt.Sprintf("creating rc %s in namespace %s for the first time", name, ns))
|
||||
}(i)
|
||||
}
|
||||
wg.Wait()
|
||||
|
Reference in New Issue
Block a user