Skip to content

Commit 018ff03

Browse files
add doc for performance test
1 parent 72aefb3 commit 018ff03

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

docs/kubernetes/development.md

+29
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,35 @@ Unit tests can be run from VS Code, etc directly or via the cmd line:
5454
$ ./test/run-unit.sh
5555
```
5656

57+
### Performance Tests
58+
Performance tests are run in automated testing frameworks, but you may wish to run them locally to benchmark changes. For a given test configuration, you need to modify the `test-config.yaml` file automatically generated from running one of the `run-k8s-integration...` or `run-windows-k8s-integration.sh` scripts to enable performance tests.
59+
60+
```yaml
61+
DriverInfo:
62+
...
63+
PerformanceTestOptions:
64+
ProvisioningOptions: # deploy 50 1Gi PVCs and measure latency/throughput
65+
VolumeSize: 1Gi
66+
Count: 50
67+
ExpectedMetrics:
68+
AvgLatency: 10000000000 # 10 seconds
69+
Throughput: 5
70+
```
71+
72+
You may modify the parameter values to customize the test.
73+
74+
You also need to modify the `StorageClass` file pointed to in `test-config.yaml` to set `volumeBindingMode: Immediate`, as the performance tests only support this mode.
75+
76+
We will be running the Kubernetes integration tests directly from its repository. Install `kubetest` and set up a test cluster with the driver installed. Now, cd into `$GOPATH/src/k8s.io/kubernetes` and run
77+
78+
```bash
79+
# pwd=k/k
80+
kubetest <custom flags based on your provider> \
81+
--check-version-skew=false \
82+
--test \
83+
--test_args="--ginkgo.focus=External.Storage.*volume-lifecycle-performance --allowed-not-ready-nodes=10 --node-os-distro=<linux or windows> --storage.testdriver=<path-to-test-config>"
84+
```
85+
5786
## Dependency Management
5887

5988
Use [dep](https://github.com/golang/dep)

0 commit comments

Comments
 (0)