Merge pull request #67776 from shyamjvs/fix-load-test-throughput

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Re-calibrate load test throughputs

/cc @wojtek-t 

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue
2018-08-24 16:43:20 -07:00
committed by GitHub

View File

@@ -121,10 +121,10 @@ var _ = SIGDescribe("Load capacity", func() {
} }
}) })
// We assume a default throughput of 10 pods/second throughput. // We assume a default throughput of 20 pods/second throughput.
// We may want to revisit it in the future. // We may want to revisit it in the future.
// However, this can be overridden by LOAD_TEST_THROUGHPUT env var. // However, this can be overridden by LOAD_TEST_THROUGHPUT env var.
throughput := 10 throughput := 20
if throughputEnv := os.Getenv("LOAD_TEST_THROUGHPUT"); throughputEnv != "" { if throughputEnv := os.Getenv("LOAD_TEST_THROUGHPUT"); throughputEnv != "" {
if newThroughput, err := strconv.Atoi(throughputEnv); err == nil { if newThroughput, err := strconv.Atoi(throughputEnv); err == nil {
throughput = newThroughput throughput = newThroughput
@@ -329,9 +329,10 @@ var _ = SIGDescribe("Load capacity", func() {
By("============================================================================") By("============================================================================")
// Cleanup all created replication controllers. // Cleanup all created replication controllers.
// Currently we assume <throughput> pods/second average deletion throughput. // Currently we assume <throughput/2> pods/second average deletion throughput,
// as GC is rate-limited and needs to make 2 calls per pod deletion.
// We may want to revisit it in the future. // We may want to revisit it in the future.
deletingTime := time.Duration(totalPods/throughput) * time.Second deletingTime := time.Duration(totalPods/(throughput/2)) * time.Second
framework.Logf("Starting to delete %v objects...", itArg.kind) framework.Logf("Starting to delete %v objects...", itArg.kind)
deleteAllResources(configs, deletingTime, testPhaseDurations.StartPhase(500, "load pods deletion")) deleteAllResources(configs, deletingTime, testPhaseDurations.StartPhase(500, "load pods deletion"))
}) })