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

Function BenchmarkFory_NumericStructList_Serialize

benchmarks/go/benchmark_test.go:264–277  ·  view source on GitHub ↗

============================================================================ NumericStructList Benchmarks ============================================================================

(b *testing.B)

Source from the content-addressed store, hash-verified

262// ============================================================================
263
264func BenchmarkFory_NumericStructList_Serialize(b *testing.B) {
265 f := newFory()
266 obj := CreateNumericStructList()
267 buf := fory.NewByteBuffer(make([]byte, 0, 65536))
268
269 b.ResetTimer()
270 for i := 0; i < b.N; i++ {
271 buf.Reset()
272 err := f.SerializeTo(buf, &obj)
273 if err != nil {
274 b.Fatal(err)
275 }
276 }
277}
278
279func BenchmarkProtobuf_NumericStructList_Serialize(b *testing.B) {
280 rejectNonForySchemaMismatch(b)

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected