(b *testing.B)
| 398 | } |
| 399 | |
| 400 | func BenchmarkProtobuf_Sample_Serialize(b *testing.B) { |
| 401 | rejectNonForySchemaMismatch(b) |
| 402 | obj := CreateSample() |
| 403 | |
| 404 | b.ResetTimer() |
| 405 | for i := 0; i < b.N; i++ { |
| 406 | pbObj := ToPbSample(obj) |
| 407 | _, err := proto.Marshal(pbObj) |
| 408 | if err != nil { |
| 409 | b.Fatal(err) |
| 410 | } |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | func BenchmarkMsgpack_Sample_Serialize(b *testing.B) { |
| 415 | rejectNonForySchemaMismatch(b) |
nothing calls this directly
no test coverage detected