aboutsummaryrefslogtreecommitdiff
path: root/bench_test.go
diff options
context:
space:
mode:
authorMatt Joiner <anacrolix@gmail.com>2019-10-23 16:07:08 +1100
committerMatt Joiner <anacrolix@gmail.com>2019-10-23 16:07:08 +1100
commit9cef1afed06ef975209116e3dee5f6187ef16073 (patch)
treef26bc936bf0e1fe3d0cc747c5cdabc5e87ea65a4 /bench_test.go
parentBreak up the stm.go file (diff)
downloadstm-9cef1afed06ef975209116e3dee5f6187ef16073.tar.gz
stm-9cef1afed06ef975209116e3dee5f6187ef16073.tar.xz
Add PingPong test and benchmark
Diffstat (limited to 'bench_test.go')
-rw-r--r--bench_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/bench_test.go b/bench_test.go
index f87477e..3dbdf73 100644
--- a/bench_test.go
+++ b/bench_test.go
@@ -125,3 +125,8 @@ func BenchmarkReadVarChannel(b *testing.B) {
wg.Wait()
}
}
+
+func BenchmarkPingPong(b *testing.B) {
+ b.ReportAllocs()
+ testPingPong(b, b.N, func(string) {})
+}