============================================================================ MediaContent Benchmarks ============================================================================
(b *testing.B)
| 625 | // ============================================================================ |
| 626 | |
| 627 | func BenchmarkFory_MediaContent_Serialize(b *testing.B) { |
| 628 | f := newFory() |
| 629 | obj := CreateMediaContent() |
| 630 | buf := fory.NewByteBuffer(make([]byte, 0, 512)) |
| 631 | |
| 632 | b.ResetTimer() |
| 633 | for i := 0; i < b.N; i++ { |
| 634 | buf.Reset() |
| 635 | err := f.SerializeTo(buf, &obj) |
| 636 | if err != nil { |
| 637 | b.Fatal(err) |
| 638 | } |
| 639 | } |
| 640 | } |
| 641 | |
| 642 | func BenchmarkProtobuf_MediaContent_Serialize(b *testing.B) { |
| 643 | rejectNonForySchemaMismatch(b) |
nothing calls this directly
no test coverage detected