tendermint/benchmarks/chan_test.go
Zach Ramsay 44dad6d70b Revert "detele everything"
This reverts commit d02c5d1e30c569ff5f785f2b7d80b875cf2e9977.
2018-07-10 11:22:25 -04:00

20 lines
259 B
Go

package benchmarks
import (
"testing"
)
func BenchmarkChanMakeClose(b *testing.B) {
b.StopTimer()
b.StartTimer()
for j := 0; j < b.N; j++ {
foo := make(chan struct{})
close(foo)
something, ok := <-foo
if ok {
b.Error(something, ok)
}
}
}