def load_results(results):
    """Loads data from a results array

    Args:
        results: Array of results to load data from

    Returns:
        A tuple of the form (cpu, memory, network, disk, messages), where each element of the tuple
        represents an array of the corresponding elements in the results.
    """
    cpu = []
    memory = []
    network = []
    disk = []
    messages = []

    last_messages = 0

    for data in results:
        # Some of the data captured is post-decline in Kapture.  Since we're using a simplw linear model,
        # that could mess up the comparison.  As such, ignore those values that follow an apparent drop-off.
        current_messages = float(data["messages"])
        if last_messages > current_messages:
            break
        last_messages = current_messages

        cpu.append(float(data["cpu"]))
        memory.append(float(data["memory"]))
        network.append(float(data["network"]))
        disk.append(float(data["disk"]))
        messages.append(current_messages)

    return (cpu, memory, network, disk, messages)