INNER CODE UNIT · Go
BenchmarkFrontHandlerWithSessionAndRawReturnsRaw
topfreegames/pitaya · benchmark/benchmark_test.go:67
func BenchmarkFrontHandlerWithSessionAndRawReturnsRaw(b *testing.B) {
clients := getClients(1, 32222)
b.ResetTimer()
for i := 0; i < b.N; i++ {
_, err := clients[0].SendRequest("connector.testsvc.testrequestreceivereturnsraw", []byte("ola"))
if err != nil {
b.Logf("failed to send request to server")
b.FailNow()
}
<-clients[0].IncomingMsgChan
}
}
func BenchmarkFrontHandlerWithSessionAndPtrReturnsPtr(b *testing.B) {
clients := getClients(1, 32222)
b.ResetTimer()