Merge pull request #82471 from yutedz/lru-cache-rw

Add note on the role of BenchmarkSimpleCache

Kubernetes-commit: 08fce550680fa7c6aa5d02164ef3e1f9e85dbbc1
This commit is contained in:
Kubernetes Publisher 2019-09-13 10:42:31 -07:00
commit 3aac406bca
1 changed files with 3 additions and 0 deletions

View File

@ -32,6 +32,9 @@ func TestSimpleCache(t *testing.T) {
testCache(newSimpleCache(4096, clock.RealClock{}), t)
}
// Note: the performance profile of this benchmark may not match that in the production.
// When making change to SimpleCache, run test with and without concurrency to better understand the impact.
// This is a tool to test and measure high concurrency of the cache in isolation and not to the Kubernetes usage of the Cache.
func BenchmarkSimpleCache(b *testing.B) {
benchmarkCache(newSimpleCache(4096, clock.RealClock{}), b)
}