MCPcopy Create free account
hub / github.com/apache/fory / BenchmarkFory_MediaContentList_Serialize

Function BenchmarkFory_MediaContentList_Serialize

benchmarks/go/benchmark_test.go:749–762  ·  view source on GitHub ↗

============================================================================ MediaContentList Benchmarks ============================================================================

(b *testing.B)

Source from the content-addressed store, hash-verified

747// ============================================================================
748
749func BenchmarkFory_MediaContentList_Serialize(b *testing.B) {
750 f := newFory()
751 obj := CreateMediaContentList()
752 buf := fory.NewByteBuffer(make([]byte, 0, 131072))
753
754 b.ResetTimer()
755 for i := 0; i < b.N; i++ {
756 buf.Reset()
757 err := f.SerializeTo(buf, &obj)
758 if err != nil {
759 b.Fatal(err)
760 }
761 }
762}
763
764func BenchmarkProtobuf_MediaContentList_Serialize(b *testing.B) {
765 rejectNonForySchemaMismatch(b)

Callers

nothing calls this directly

Calls 4

ResetMethod · 0.95
CreateMediaContentListFunction · 0.85
SerializeToMethod · 0.80
newForyFunction · 0.70

Tested by

no test coverage detected