def chunk_workload(workload, size):
    """
    Splits workload into multiple chunks,
    to iteratively add large amount of data into redis
    Currently split happens only by number of elements
    """
    chunk = []
    for item in workload:
        chunk.append(item)
        if len(chunk) >= size:
            yield chunk
            chunk = []
    if chunk:
        yield chunk
