diff options
| author | Clayton Coleman <ccoleman@redhat.com> | 2016-01-12 21:10:38 -0500 |
|---|---|---|
| committer | Clayton Coleman <ccoleman@redhat.com> | 2016-01-28 21:34:51 -0500 |
| commit | 52c6c3c1ada6aaff5a3d37b5cff2bec4999c5c4c (patch) | |
| tree | 90784474f09f6dfc07fdf6770bed4778af280d06 /development.md | |
| parent | 1256768871a22dbb88d8111c690441ec6b09b0db (diff) | |
Add benchmarks for watch over websocket and http
... and a quick doc on how to run them
```
$ godep go test ./pkg/apiserver -benchmem -run=XXX -bench=BenchmarkWatch
PASS
BenchmarkWatchHTTP-8 20000 95669 ns/op 15053 B/op 196 allocs/op
BenchmarkWatchWebsocket-8 10000 102871 ns/op 18430 B/op 204 allocs/op
```
Diffstat (limited to 'development.md')
| -rw-r--r-- | development.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/development.md b/development.md index 95dccaa9..06aa870a 100644 --- a/development.md +++ b/development.md @@ -374,6 +374,15 @@ See [conformance-test.sh](http://releases.k8s.io/HEAD/hack/conformance-test.sh). [Instructions here](flaky-tests.md) +## Benchmarking + +To run benchmark tests, you'll typically use something like: + + $ godep go test ./pkg/apiserver -benchmem -run=XXX -bench=BenchmarkWatch + +The `-run=XXX` prevents normal unit tests for running, while `-bench` is a regexp for selecting which benchmarks to run. +See `go test -h` for more instructions on generating profiles from benchmarks. + ## Regenerating the CLI documentation ```sh |
