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