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

Function BenchmarkMsgpack_Sample_Serialize

benchmarks/go/benchmark_test.go:414–425  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

412}
413
414func BenchmarkMsgpack_Sample_Serialize(b *testing.B) {
415 rejectNonForySchemaMismatch(b)
416 obj := CreateSample()
417
418 b.ResetTimer()
419 for i := 0; i < b.N; i++ {
420 _, err := msgpack.Marshal(obj)
421 if err != nil {
422 b.Fatal(err)
423 }
424 }
425}
426
427func BenchmarkFory_Sample_Deserialize(b *testing.B) {
428 writer := newFory()

Callers

nothing calls this directly

Calls 3

CreateSampleFunction · 0.85
MarshalMethod · 0.80

Tested by

no test coverage detected