Skip to content

Commit 607ed67

Browse files
authored
Merge pull request kubernetes#88415 from ingvagabund/readme-for-metrics-based-scheduler-perf-tests
scheduler_perf: describe how to run BenchmarkPerfScheduling manually
2 parents 624da8b + 0f3e0b4 commit 607ed67

File tree

2 files changed

+31
-55
lines changed

2 files changed

+31
-55
lines changed

test/integration/scheduler_perf/README.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,42 @@ Currently the test suite has the following:
3131

3232
How To Run
3333
------
34+
35+
## Density tests
36+
3437
```shell
3538
# In Kubernetes root path
36-
make generated_files
39+
make test-integration WHAT=./test/integration/scheduler_perf KUBE_TEST_VMODULE="''" KUBE_TEST_ARGS="-alsologtostderr=true -logtostderr=true -run=." KUBE_TIMEOUT="--timeout=60m" SHORT="--short=false"
40+
```
41+
42+
## Benchmark tests
43+
44+
```shell
45+
# In Kubernetes root path
46+
make test-integration WHAT=./test/integration/scheduler_perf KUBE_TEST_VMODULE="''" KUBE_TEST_ARGS="-alsologtostderr=false -logtostderr=false -run=^$$ -benchtime=1ns -bench=BenchmarkPerfScheduling"
47+
```
48+
49+
The benchmark suite runs all the tests specified under config/performance-config.yaml.
3750

38-
cd test/integration/scheduler_perf
39-
./test-performance.sh
51+
Once the benchmark is finished, JSON file with metrics is available in the current directory (test/integration/scheduler_perf). Look for `BenchmarkPerfScheduling_YYYY-MM-DDTHH:MM:SSZ.json`.
52+
You can use `-data-items-dir` to generate the metrics file elsewhere.
53+
54+
In case you want to run a specific test in the suite, you can specify the test through `-bench` flag:
55+
56+
Also, bench time is explicitly set to 1ns (`-benchtime=1ns` flag) so each test is run only once.
57+
Otherwise, the golang benchmark framework will try to run a test more than once in case it ran for less than 1s.
58+
59+
```shell
60+
# In Kubernetes root path
61+
make test-integration WHAT=./test/integration/scheduler_perf KUBE_TEST_VMODULE="''" KUBE_TEST_ARGS="-alsologtostderr=false -logtostderr=false -run=^$$ -benchtime=1ns -bench=BenchmarkPerfScheduling/SchedulingBasic/5000Nodes/5000InitPods/1000PodsToSchedule"
4062
```
4163

64+
To produce a cpu profile:
65+
66+
```shell
67+
# In Kubernetes root path
68+
make test-integration WHAT=./test/integration/scheduler_perf KUBE_TIMEOUT="-timeout=3600s" KUBE_TEST_VMODULE="''" KUBE_TEST_ARGS="-alsologtostderr=false -logtostderr=false -run=^$$ -benchtime=1ns -bench=BenchmarkPerfScheduling -cpuprofile ~/cpu-profile.out"
69+
```
4270

4371
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
4472
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/test/component/scheduler/perf/README.md?pixel)]()

test/integration/scheduler_perf/test-performance.sh

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)