mirror of
https://github.com/patrickmn/go-cache.git
synced 2025-09-26 19:51:15 +08:00
@@ -1555,7 +1555,7 @@ func benchmarkCacheGetManyConcurrent(b *testing.B, exp time.Duration) {
|
|||||||
tc := New(exp, 0)
|
tc := New(exp, 0)
|
||||||
keys := make([]string, n)
|
keys := make([]string, n)
|
||||||
for i := 0; i < n; i++ {
|
for i := 0; i < n; i++ {
|
||||||
k := "foo" + strconv.Itoa(n)
|
k := "foo" + strconv.Itoa(i)
|
||||||
keys[i] = k
|
keys[i] = k
|
||||||
tc.Set(k, "bar", DefaultExpiration)
|
tc.Set(k, "bar", DefaultExpiration)
|
||||||
}
|
}
|
||||||
|
@@ -65,7 +65,7 @@ func benchmarkShardedCacheGetManyConcurrent(b *testing.B, exp time.Duration) {
|
|||||||
tsc := unexportedNewSharded(exp, 0, 20)
|
tsc := unexportedNewSharded(exp, 0, 20)
|
||||||
keys := make([]string, n)
|
keys := make([]string, n)
|
||||||
for i := 0; i < n; i++ {
|
for i := 0; i < n; i++ {
|
||||||
k := "foo" + strconv.Itoa(n)
|
k := "foo" + strconv.Itoa(i)
|
||||||
keys[i] = k
|
keys[i] = k
|
||||||
tsc.Set(k, "bar", DefaultExpiration)
|
tsc.Set(k, "bar", DefaultExpiration)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user