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

Function benchmark_number

benchmarks/python/benchmark.py:892–901  ·  view source on GitHub ↗
(base_number: int, datatype: str)

Source from the content-addressed store, hash-verified

890
891
892def benchmark_number(base_number: int, datatype: str) -> int:
893 scale = {
894 "struct": 1.0,
895 "sample": 0.5,
896 "mediacontent": 0.4,
897 "structlist": 0.25,
898 "samplelist": 0.2,
899 "mediacontentlist": 0.15,
900 }
901 return max(1, int(base_number * scale.get(datatype, 1.0)))
902
903
904def parse_args() -> argparse.Namespace:

Callers 1

mainFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected