github.com/ezoic/ws@v1.0.4-0.20220713205711-5c1d69e074c5/nonce_test.go (about)

     1  package ws
     2  
     3  import "testing"
     4  
     5  func BenchmarkInitAcceptFromNonce(b *testing.B) {
     6  	dst := make([]byte, acceptSize)
     7  	nonce := mustMakeNonce()
     8  	for i := 0; i < b.N; i++ {
     9  		initAcceptFromNonce(dst, nonce)
    10  	}
    11  }