(b *testing.B)
| 153 | } |
| 154 | |
| 155 | func BenchmarkProtobuf_NumericStruct_Serialize(b *testing.B) { |
| 156 | rejectNonForySchemaMismatch(b) |
| 157 | obj := CreateNumericStruct() |
| 158 | |
| 159 | b.ResetTimer() |
| 160 | for i := 0; i < b.N; i++ { |
| 161 | // Fair comparison: convert struct to protobuf, then serialize |
| 162 | pbObj := ToPbStruct(obj) |
| 163 | _, err := proto.Marshal(pbObj) |
| 164 | if err != nil { |
| 165 | b.Fatal(err) |
| 166 | } |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | func BenchmarkMsgpack_NumericStruct_Serialize(b *testing.B) { |
| 171 | rejectNonForySchemaMismatch(b) |
nothing calls this directly
no test coverage detected