============================================================================ NumericStruct Benchmarks ============================================================================
(b *testing.B)
| 138 | // ============================================================================ |
| 139 | |
| 140 | func BenchmarkFory_NumericStruct_Serialize(b *testing.B) { |
| 141 | f := newFory() |
| 142 | obj := CreateNumericStruct() |
| 143 | buf := fory.NewByteBuffer(make([]byte, 0, 128)) |
| 144 | |
| 145 | b.ResetTimer() |
| 146 | for i := 0; i < b.N; i++ { |
| 147 | buf.Reset() |
| 148 | err := f.SerializeTo(buf, &obj) |
| 149 | if err != nil { |
| 150 | b.Fatal(err) |
| 151 | } |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | func BenchmarkProtobuf_NumericStruct_Serialize(b *testing.B) { |
| 156 | rejectNonForySchemaMismatch(b) |
nothing calls this directly
no test coverage detected