import sys import pyperf runner = pyperf.Runner() obj = None # builtins.id() is declared with METH_O calling convention runner.bench_time_func("bench", sys.test_bench, id, obj)