INNER CODE UNIT · Go

BenchmarkBackHandlerWithSessionOnlyReturnsPtr

topfreegames/pitaya · benchmark/benchmark_test.go:159

func BenchmarkBackHandlerWithSessionOnlyReturnsPtr(b *testing.B) {
	clients := getClients(1, 32222)

	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		_, err := clients[0].SendRequest("game.testsvc.testrequestonlysessionreturnsptr", []byte{})
		if err != nil {
			b.Logf("failed to send request to server")
			b.FailNow()
		}

		<-clients[0].IncomingMsgChan
	}
}

func BenchmarkBackHandlerWithSessionOnlyReturnsPtrParallel(b *testing.B) {
	clients := getClients(1, 32222)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…