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

Function build_fory_benchmark_case

benchmarks/python/fory_benchmark.py:376–382  ·  view source on GitHub ↗
(operation: str, ref: bool, obj)

Source from the content-addressed store, hash-verified

374
375
376def build_fory_benchmark_case(operation: str, ref: bool, obj):
377 if operation == "serialize":
378 return fory_serialize, (ref, obj)
379 if operation == "deserialize":
380 fory = fory_with_ref if ref else fory_without_ref
381 return fory_deserialize, (ref, fory.serialize(obj))
382 return fory_roundtrip, (ref, obj)
383
384
385def build_pickle_benchmark_case(operation: str, obj):

Callers 1

micro_benchmarkFunction · 0.85

Calls 1

serializeMethod · 0.65

Tested by

no test coverage detected