github.com/karrick/gorill@v1.10.3/normal_writer_test.go (about)

     1  // +build !race
     2  
     3  package gorill
     4  
     5  import (
     6  	"io"
     7  	"testing"
     8  )
     9  
    10  // The test contains a data race to determine maximum throughput of writing, while ignoring race
    11  // conditions.
    12  func BenchmarkWriterNormalWriter(b *testing.B) {
    13  	consumers := make([]io.WriteCloser, consumerCount)
    14  	for i := 0; i < len(consumers); i++ {
    15  		consumers[i] = NewNopCloseBuffer()
    16  	}
    17  	benchmarkWriter(b, b.N, consumers)
    18  }