(b *testing.B)
| 42 | } |
| 43 | |
| 44 | func BenchmarkWriteNoCompression(b *testing.B) { |
| 45 | w := ioutil.Discard |
| 46 | c := newTestConn(nil, w, false) |
| 47 | messages := textMessages(100) |
| 48 | b.ResetTimer() |
| 49 | for i := 0; i < b.N; i++ { |
| 50 | c.WriteMessage(TextMessage, messages[i%len(messages)]) |
| 51 | } |
| 52 | b.ReportAllocs() |
| 53 | } |
| 54 | |
| 55 | func BenchmarkWriteWithCompression(b *testing.B) { |
| 56 | w := ioutil.Discard |
nothing calls this directly
no test coverage detected