(b *testing.B)
| 1608 | } |
| 1609 | |
| 1610 | func BenchmarkRWMutexMapSet(b *testing.B) { |
| 1611 | b.StopTimer() |
| 1612 | m := map[string]string{} |
| 1613 | mu := sync.RWMutex{} |
| 1614 | b.StartTimer() |
| 1615 | for i := 0; i < b.N; i++ { |
| 1616 | mu.Lock() |
| 1617 | m["foo"] = "bar" |
| 1618 | mu.Unlock() |
| 1619 | } |
| 1620 | } |
| 1621 | |
| 1622 | func BenchmarkCacheSetDelete(b *testing.B) { |
| 1623 | b.StopTimer() |