Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test overhead of large amounts of non-rootish tasks #903

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions alembic/versions/9813b7160e69_parametrize_test_large_map.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""Parametrize test_large_map

Revision ID: 9813b7160e69
Revises: f459b2c61eaf
Create Date: 2023-07-05 11:04:08.510205

"""
from alembic import op


# revision identifiers, used by Alembic.
revision = '9813b7160e69'
down_revision = 'f459b2c61eaf'
branch_labels = None
depends_on = None


def upgrade() -> None:
op.execute(
"""
update test_run
set name = 'test_large_map[rootish]'
where name == 'test_large_map';
"""
)

def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
14 changes: 12 additions & 2 deletions tests/benchmarks/test_futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,19 @@ def test_single_future(small_client):


@run_up_to_nthreads("small_cluster", 50, reason="fixed dataset")
def test_large_map(small_client):
@pytest.mark.parametrize("rootish", ["rootish", "non-rootish"])
def test_large_map(small_client, rootish):
"""What's the overhead of map these days?"""
futures = small_client.map(inc, range(100_000))
if rootish == "rootish":
futures = small_client.map(inc, range(100_000))
else:

def inc_with_deps(i, deps):
return i + 1

deps = small_client.map(inc, range(5))
futures = small_client.map(inc_with_deps, range(100_000), deps=deps)

wait(futures)


Expand Down