summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKubernetes Prow Robot <k8s-ci-robot@users.noreply.github.com>2019-06-20 15:14:36 -0700
committerGitHub <noreply@github.com>2019-06-20 15:14:36 -0700
commit0cb6450c10af29d3e70d93e2fd149f4357e883ce (patch)
treeaefa53c6f6449266e007dc9c74a19990cc2d6693
parent25adc85683dd0745705e171006e6724178f396fe (diff)
parent7ce57c6a8e914453b19961878c7ed12971b4ccd2 (diff)
Merge pull request #3821 from Huang-Wei/convenitonal-test-args
conventional test args to bypass UTs
-rw-r--r--contributors/devel/sig-scheduling/scheduler_benchmarking.md10
1 files changed, 6 insertions, 4 deletions
diff --git a/contributors/devel/sig-scheduling/scheduler_benchmarking.md b/contributors/devel/sig-scheduling/scheduler_benchmarking.md
index dc456e21..1c08b5d8 100644
--- a/contributors/devel/sig-scheduling/scheduler_benchmarking.md
+++ b/contributors/devel/sig-scheduling/scheduler_benchmarking.md
@@ -11,7 +11,7 @@ To run integration benchmarks use the following command from inside a Kubernetes
directory.
```sh
-make test-integration WHAT=./test/integration/scheduler_perf KUBE_TEST_VMODULE="''" KUBE_TEST_ARGS="-run=xxx -bench=."
+make test-integration WHAT=./test/integration/scheduler_perf KUBE_TEST_VMODULE="''" KUBE_TEST_ARGS="-run=^$$ -bench=."
```
You can also provide a benchmark name in order to run a specific set of
@@ -19,9 +19,11 @@ benchmarks. Please refer to [Go documentation on benchmarks](https://golang.org/
for more information.
```sh
-make test-integration WHAT=./test/integration/scheduler_perf KUBE_TEST_VMODULE="''" KUBE_TEST_ARGS="-run=xxx -bench=BenchmarkScheduling"
+make test-integration WHAT=./test/integration/scheduler_perf KUBE_TEST_VMODULE="''" KUBE_TEST_ARGS="-run=^$$ -bench=BenchmarkScheduling"
```
+> To display benchmark output only, you can append `-alsologtostderr=false -logtostderr=false` to `KUBE_TEST_ARGS`.
+
These benchmarks are located in `./test/integration/scheduler_perf/scheduler_bench_test.go`.
The function names start with `BenchmarkScheduling`. At the beginning of each
function there are a few lines in the form of:
@@ -51,7 +53,7 @@ it in the `-bench` argument. For example, the following will run only those
benchmarks with 5000 nodes and 1000 existing pods.
```sh
-make test-integration WHAT=./test/integration/scheduler_perf KUBE_TEST_VMODULE="''" KUBE_TEST_ARGS="-run=xxx -bench=BenchmarkScheduling/5000Nodes/1000Pods"
+make test-integration WHAT=./test/integration/scheduler_perf KUBE_TEST_VMODULE="''" KUBE_TEST_ARGS="-run=^$$ -bench=BenchmarkScheduling/5000Nodes/1000Pods"
```
## Profiling the scheduler
@@ -60,7 +62,7 @@ You can get CPU profiling information from the benchmarks by adding a `-cpuprofi
to the command above. Example:
```sh
-make test-integration WHAT=./test/integration/scheduler_perf KUBE_TEST_VMODULE="''" KUBE_TEST_ARGS="-run=xxx -bench=BenchmarkScheduling -cpuprofile cpu.out"
+make test-integration WHAT=./test/integration/scheduler_perf KUBE_TEST_VMODULE="''" KUBE_TEST_ARGS="-run=^$$ -bench=BenchmarkScheduling -cpuprofile cpu.out"
```
After obtaining the CPU profile, you can use `pprof` to view the results. For