mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-31 04:01:55 +00:00
Tendermint <-> Application refactor
This commit is contained in:
19
benchmarks/chan_test.go
Normal file
19
benchmarks/chan_test.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user