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

Function BenchmarkMsgpack_NumericStruct_Serialize

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

Source from the content-addressed store, hash-verified

168}
169
170func BenchmarkMsgpack_NumericStruct_Serialize(b *testing.B) {
171 rejectNonForySchemaMismatch(b)
172 obj := CreateNumericStruct()
173
174 b.ResetTimer()
175 for i := 0; i < b.N; i++ {
176 _, err := msgpack.Marshal(obj)
177 if err != nil {
178 b.Fatal(err)
179 }
180 }
181}
182
183func BenchmarkFory_NumericStruct_Deserialize(b *testing.B) {
184 writer := newFory()

Callers

nothing calls this directly

Calls 3

CreateNumericStructFunction · 0.85
MarshalMethod · 0.80

Tested by

no test coverage detected