from typing import Callable
import time
import logging


def main_runner(*functions: Callable) -> Callable:
    """Returns a main function that calls given functions in order

    Progression is logged.
    """

    def wrapper() -> None:
        n_steps = len(functions)
        t = time.perf_counter()
        for i, function in enumerate(functions, 1):
            logging.info(f"Step #{i}/{n_steps}")
            function()
        logging.info(f"Global execution took {time.perf_counter() - t:.3f} s")

    return wrapper