From 2f41f2d79496102da6c319ec87467ee85ec841c9 Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski Date: Thu, 1 Sep 2016 11:31:31 +0200 Subject: [PATCH] Increase QPS limit in load test client --- test/e2e/load.go | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/test/e2e/load.go b/test/e2e/load.go index 712ba020d3b..22b1ac3595d 100644 --- a/test/e2e/load.go +++ b/test/e2e/load.go @@ -18,6 +18,7 @@ package e2e import ( "fmt" + "math" "math/rand" "os" "strconv" @@ -70,11 +71,21 @@ var _ = framework.KubeDescribe("Load capacity", func() { Expect(highLatencyRequests).NotTo(BeNumerically(">", 0)) }) + // We assume a default throughput of 10 pods/second throughput. + // We may want to revisit it in the future. + // However, this can be overriden by LOAD_TEST_THROUGHPUT env var. + throughput := 10 + if throughputEnv := os.Getenv("LOAD_TEST_THROUGHPUT"); throughputEnv != "" { + if newThroughput, err := strconv.Atoi(throughputEnv); err == nil { + throughput = newThroughput + } + } + // Explicitly put here, to delete namespace at the end of the test // (after measuring latency metrics, etc.). options := framework.FrameworkOptions{ - ClientQPS: 50, - ClientBurst: 100, + ClientQPS: float32(math.Max(50.0, float64(2*throughput))), + ClientBurst: int(math.Max(100.0, float64(4*throughput))), } f := framework.NewFramework("load", options, nil) f.NamespaceDeletionTimeout = time.Hour @@ -142,16 +153,6 @@ var _ = framework.KubeDescribe("Load capacity", func() { framework.Logf("Skipping service creation") } - // We assume a default throughput of 10 pods/second throughput. - // We may want to revisit it in the future. - // However, this can be overriden by LOAD_TEST_THROUGHPUT env var. - throughput := 10 - if throughputEnv := os.Getenv("LOAD_TEST_THROUGHPUT"); throughputEnv != "" { - if newThroughput, err := strconv.Atoi(throughputEnv); err == nil { - throughput = newThroughput - } - } - // Simulate lifetime of RC: // * create with initial size // * scale RC to a random size and list all pods