def METHOD_NAME(max_history: int = 100) -> None:
    """
    Enable recording of performance information.
    This function must be called before using any other performance
    features, except for :func:`arcade.timings_enabled`, which can
    be called at any time.
    See :ref:`performance_statistics_example` for an example of how to
    use function.
    :param max_history: How many frames to keep performance info for.
    """
    global _pyglets_dispatch_event, _max_history
    if pyglet.window.BaseWindow.dispatch_event == _dispatch_event:
        raise ValueError("Timings already enabled.")
    # Save the original pyglet dispatch event function
    _pyglets_dispatch_event = pyglet.window.BaseWindow.dispatch_event
    # Override the pyglet dispatch event function
    pyglet.window.BaseWindow.dispatch_event = _dispatch_event
    _max_history = max_history