We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3f75db commit b296e78Copy full SHA for b296e78
pyperformance/data-files/benchmarks/bm_ctypes/run_benchmark.py
@@ -90,8 +90,13 @@ def benchmark(loops):
90
return pyperf.perf_counter() - t0
91
92
93
+def add_cmdline_args(cmd, args):
94
+ if args.argtypes:
95
+ cmd.append("--argtypes")
96
+
97
98
if __name__ == "__main__":
- runner = pyperf.Runner()
99
+ runner = pyperf.Runner(add_cmdline_args=add_cmdline_args)
100
runner.metadata["description"] = "ctypes function call overhead benchmark"
101
102
runner.argparser.add_argument("--argtypes", action="store_true")
@@ -101,4 +106,3 @@ def benchmark(loops):
106
runner.bench_time_func("ctypes_argtypes", benchmark_argtypes, inner_loops=3)
107
else:
103
108
runner.bench_time_func("ctypes", benchmark, inner_loops=3)
104
-
0 commit comments