(b *testing.B)
| 29 | } |
| 30 | |
| 31 | func BenchmarkSerializer_Serialize(b *testing.B) { |
| 32 | m := &Message{100, "hell world"} |
| 33 | s := NewSerializer() |
| 34 | |
| 35 | for i := 0; i < b.N; i++ { |
| 36 | if _, err := s.Marshal(m); err != nil { |
| 37 | b.Fatalf("unmarshal failed: %v", err) |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | b.ReportAllocs() |
| 42 | } |
| 43 | |
| 44 | func BenchmarkSerializer_Deserialize(b *testing.B) { |
| 45 | m := &Message{100, "hell world"} |
nothing calls this directly
no test coverage detected
searching dependent graphs…