import time


async def bench_stddev(client):
    """Benchmark the standard deviation aggregate calculation."""
    table = client.open_table("data_source_one")
    start = time.time()
    view = await table.view(
        row_pivots=["State"],
        aggregates={"Sales": "standard deviation"},
        columns=["Sales"],
    )
    num_rows = await view.num_rows()
    end = time.time() - start
    assert num_rows > 0
    return [end]