(codec encoding.CodecV2, protoStruct proto.Message, b *testing.B)
| 88 | } |
| 89 | |
| 90 | func fastMarshalAndUnmarshal(codec encoding.CodecV2, protoStruct proto.Message, b *testing.B) { |
| 91 | marshaledBytes, err := codec.Marshal(protoStruct) |
| 92 | if err != nil { |
| 93 | b.Errorf("codec.Marshal(_) returned an error") |
| 94 | } |
| 95 | res := pb.Buffer{} |
| 96 | if err := codec.Unmarshal(marshaledBytes, &res); err != nil { |
| 97 | b.Errorf("codec.Unmarshal(_) returned an error") |
| 98 | } |
| 99 | } |
no test coverage detected