MCPcopy
hub / github.com/gorilla/websocket / textMessages

Function textMessages

compression_test.go:35–42  ·  compression_test.go::textMessages
(num int)

Source from the content-addressed store, hash-verified

33}
34
35func textMessages(num int) [][]byte {
36 messages := make([][]byte, num)
37 for i := 0; i < num; i++ {
38 msg := fmt.Sprintf("planet: %d, country: %d, city: %d, street: %d", i, i, i, i)
39 messages[i] = []byte(msg)
40 }
41 return messages
42}
43
44func BenchmarkWriteNoCompression(b *testing.B) {
45 w := ioutil.Discard

Callers 3

BenchmarkBroadcastFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected