def data_rate(size: float, time: float, ratio: float = 1.05, overhead: float = 128) -> float:
    """Convert a heap size to a data rate in bits per second.

    Parameters
    ----------
    size
        Size in bytes
    time
        Time between heaps in seconds
    ratio
        Relative overhead
    overhead
        Absolute overhead, in bytes
    """
    return (size * ratio + overhead) * 8 / time