import time


async def bench_to_arrow(client):
    """Test how long it takes to create a view on the remote table and
    retrieve an arrow."""
    table = client.open_table("data_source_one")
    view = await table.view()
    start = time.time()
    arrow = await view.to_arrow()
    end = time.time() - start
    assert len(arrow) > 0
    return [end]