From f861b8e1c38ae7f3fa903ade86bbb2fe6dd1fa80 Mon Sep 17 00:00:00 2001 From: Tevin Zhang Date: Thu, 16 Jul 2020 15:02:52 +0800 Subject: [PATCH] Remove useless parts in benchmarks --- bool_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bool_test.go b/bool_test.go index d32746d..b3db9f1 100644 --- a/bool_test.go +++ b/bool_test.go @@ -269,7 +269,6 @@ func BenchmarkMutexCAS(b *testing.B) { } m.Unlock() } - b.StopTimer() } 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) { var m sync.RWMutex @@ -291,7 +290,6 @@ func BenchmarkMutexToggle(b *testing.B) { v = !v m.Unlock() } - b.StopTimer() } func BenchmarkAtomicBoolToggle(b *testing.B) {