Benchmark python code with timeit

def bench_1():
    "%s" % (globals(),)


def bench_2():
    """Custom name"""
    "{}".format(globals())


if __name__ == "__main__":
    from timeit import timeit

    for func_name, func in list(globals().items()):
        if func_name.startswith("bench_"):
            name = func.__doc__ or func_name
            took = timeit(func_name + "()", number=10000, globals=globals())
            print(f"{name:>25} {took}")