This commit is contained in:
zy 2018-04-04 06:39:22 +00:00 committed by GitHub
commit 1f679e697a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -1563,9 +1563,10 @@ func benchmarkCacheGetManyConcurrent(b *testing.B, exp time.Duration) {
wg := new(sync.WaitGroup)
wg.Add(n)
for _, v := range keys {
k := v
go func() {
for j := 0; j < each; j++ {
tc.Get(v)
tc.Get(k)
}
wg.Done()
}()

View File

@ -7,9 +7,6 @@ import (
"time"
)
// func TestDjb33(t *testing.T) {
// }
var shardedKeys = []string{
"f",
"fo",
@ -73,9 +70,10 @@ func benchmarkShardedCacheGetManyConcurrent(b *testing.B, exp time.Duration) {
wg := new(sync.WaitGroup)
wg.Add(n)
for _, v := range keys {
k := v
go func() {
for j := 0; j < each; j++ {
tsc.Get(v)
tsc.Get(k)
}
wg.Done()
}()