(b *testing.B, pb proto.Message)
| 2242 | } |
| 2243 | |
| 2244 | func benchmarkBufferMarshal(b *testing.B, pb proto.Message) { |
| 2245 | p := proto.NewBuffer(nil) |
| 2246 | benchmarkMarshal(b, pb, func(pb0 proto.Message) ([]byte, error) { |
| 2247 | p.Reset() |
| 2248 | err := p.Marshal(pb0) |
| 2249 | return p.Bytes(), err |
| 2250 | }) |
| 2251 | } |
| 2252 | |
| 2253 | func benchmarkSize(b *testing.B, pb proto.Message) { |
| 2254 | benchmarkMarshal(b, pb, func(pb0 proto.Message) ([]byte, error) { |
nothing calls this directly
no test coverage detected