mirror of
https://github.com/patrickmn/go-cache.git
synced 2025-09-27 03:56:09 +08:00
Use a type switch instead, and Use unexported NewSharded in test
This commit is contained in:
@@ -734,7 +734,7 @@ func BenchmarkCacheGetManyConcurrent(b *testing.B) {
|
||||
func BenchmarkShardedCacheGetManyConcurrent(b *testing.B) {
|
||||
b.StopTimer()
|
||||
n := 10000
|
||||
tsc := NewSharded(20, 0, 0)
|
||||
tsc := unexportedNewSharded(20, 0, 0)
|
||||
keys := make([]string, n)
|
||||
for i := 0; i < n; i++ {
|
||||
k := "foo" + strconv.Itoa(n)
|
||||
|
Reference in New Issue
Block a user