(b *testing.B)
| 7 | ) |
| 8 | |
| 9 | func BenchmarkEncodeString(b *testing.B) { |
| 10 | var ( |
| 11 | s = "this is a reasonably long string so that the encoder function has to actually do some work" |
| 12 | buf = make([]byte, len(s)) |
| 13 | ) |
| 14 | for n := 0; n < b.N; n++ { |
| 15 | enc := csproto.NewEncoder(buf) |
| 16 | enc.EncodeString(1, s) |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | func BenchmarkSafeDecodeString(b *testing.B) { |
| 21 | var ( |
nothing calls this directly
no test coverage detected