示例#1
0
func BenchmarkStaticIntMerge1InputLargeAmountValues(b *testing.B) {
	for n := 0; n < b.N; n++ {
		is := giveMeSomeChannels(1)
		o := make(chan int)

		merge.StaticIntMerge(o, is...)

		sendIntsToChan(large, is)
		go consumeSomeInts(large, o)
	}
}
示例#2
0
func BenchmarkStaticIntMerge50InputSmallAmountValues(b *testing.B) {
	for n := 0; n < b.N; n++ {
		is := giveMeSomeChannels(50)
		o := make(chan int)

		merge.StaticIntMerge(o, is...)

		sendIntsToChan(small, is)
		go consumeSomeInts(small*50, o)
	}
}