Remove useless parts in benchmarks

This commit is contained in:
Tevin Zhang 2020-07-16 15:02:52 +08:00
parent 78e36140ca
commit f861b8e1c3
No known key found for this signature in database
GPG Key ID: EE7DA2A50F0960FB
1 changed files with 1 additions and 3 deletions

View File

@ -269,7 +269,6 @@ func BenchmarkMutexCAS(b *testing.B) {
} }
m.Unlock() m.Unlock()
} }
b.StopTimer()
} }
func BenchmarkAtomicBoolCAS(b *testing.B) { func BenchmarkAtomicBoolCAS(b *testing.B) {
@ -280,7 +279,7 @@ func BenchmarkAtomicBoolCAS(b *testing.B) {
} }
} }
// Benchmark toggle boolean value // Benchmark toggle
func BenchmarkMutexToggle(b *testing.B) { func BenchmarkMutexToggle(b *testing.B) {
var m sync.RWMutex var m sync.RWMutex
@ -291,7 +290,6 @@ func BenchmarkMutexToggle(b *testing.B) {
v = !v v = !v
m.Unlock() m.Unlock()
} }
b.StopTimer()
} }
func BenchmarkAtomicBoolToggle(b *testing.B) { func BenchmarkAtomicBoolToggle(b *testing.B) {