-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
capacity: add benchmark for CSIStorageCapacity update
It may be possible to optimize updating capacity by using patching. Before trying that we need a benchmark. This benchmark acts as a client with basically unlimited local rate limits. When run long enough, the results are stable: $ go test -run=xxx -bench=. -count=5 -benchtime=1m . | tee /tmp/log ... $ $GOPATH/bin/benchstat /tmp/log name time/op CapacityUpdate-36 3.93ms ± 1%
- Loading branch information
Showing
2 changed files
with
151 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
To benchmark the CSIStorageCapacity update code, use: | ||
|
||
``` | ||
KUBECONFIG=<some config file> go test -bench=. -run=xxx . | ||
``` | ||
|
||
Running repeatedly with `-count=5` and filtering the output with | ||
[benchstat](https://pkg.go.dev/golang.org/x/perf/cmd/benchstat) is recommended | ||
to determine how stable the results are. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters