INNER CODE UNIT · Go
c
topfreegames/pitaya · benchmark/benchmark_test.go:35
c := make([]*client.Client, n)
for i := 0; i < n; i++ {
c[i] = client.New(logrus.FatalLevel)
err := c[i].ConnectTo(fmt.Sprintf("%s:%d", "localhost", port))
if err != nil {
panic(err)
}
}
return c
}
func TestMain(m *testing.M) {
exit := m.Run()
os.Exit(exit)
}
func BenchmarkCreateManyClients(b *testing.B) {