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

Function BenchmarkMsgpack_NumericStruct_Deserialize

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

Source from the content-addressed store, hash-verified

240}
241
242func BenchmarkMsgpack_NumericStruct_Deserialize(b *testing.B) {
243 rejectNonForySchemaMismatch(b)
244 obj := CreateNumericStruct()
245 data, err := msgpack.Marshal(obj)
246 if err != nil {
247 b.Fatal(err)
248 }
249
250 b.ResetTimer()
251 for i := 0; i < b.N; i++ {
252 var result NumericStruct
253 err := msgpack.Unmarshal(data, &result)
254 if err != nil {
255 b.Fatal(err)
256 }
257 }
258}
259
260// ============================================================================
261// NumericStructList Benchmarks

Callers

nothing calls this directly

Calls 4

CreateNumericStructFunction · 0.85
MarshalMethod · 0.80
UnmarshalMethod · 0.80

Tested by

no test coverage detected