(name, setup, stmt, iterations)
Run the benchmark and print benchmark results.

    # Arguments

    * `name`: benchmark name
    * `setup`: benchmark setup
    * `stmt`: statement to benchmark
    * `iterations`: number of iterations

    # Examples

    ``` python
    python> benchmark("random", "from random import random;", "y = random()", 1000000)
    ```
Run the benchmark and print benchmark results.
Run the benchmark and print benchmark results .
def benchmark(name, setup, stmt, iterations):
    """Run the benchmark and print benchmark results.

    # Arguments

    * `name`: benchmark name
    * `setup`: benchmark setup
    * `stmt`: statement to benchmark
    * `iterations`: number of iterations

    # Examples

    ``` python
    python> benchmark("random", "from random import random;", "y = random()", 1000000)
    ```
    """
    t = timeit.Timer(stmt, setup=setup)

    print_version()

    i = 0
    while i < REPEATS:
        print("# python::" + name)
        COUNT[0] += 1
        elapsed = t.timeit(number=iterations)
        print_results(iterations, elapsed)
        print("ok " + str(COUNT[0]) + " benchmark finished")
        i += 1
def benchmark ( name , setup , stmt , iterations ) : t = timeit . Timer ( stmt , setup = setup ) print_version ( ) i = 0 while i < REPEATS : print ( "# python::" + name ) COUNT [ 0 ] += 1 elapsed = t . timeit ( number = iterations ) print_results ( iterations , elapsed ) print ( "ok " + str ( COUNT [ 0 ] ) + " benchmark finished" ) i += 1