From cfda47b76f06bfdc4b4561923c576df91e864215 Mon Sep 17 00:00:00 2001 From: Gregory Kimball Date: Tue, 16 Aug 2022 19:48:40 -0700 Subject: [PATCH 1/3] Adjust key and column names to match generator --- python/cudf/benchmarks/API/bench_dataframe.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/cudf/benchmarks/API/bench_dataframe.py b/python/cudf/benchmarks/API/bench_dataframe.py index 9bad637f6ae..bf4b6eabb98 100644 --- a/python/cudf/benchmarks/API/bench_dataframe.py +++ b/python/cudf/benchmarks/API/bench_dataframe.py @@ -41,10 +41,10 @@ def bench_merge(benchmark, dataframe, num_key_cols): @pytest.mark.parametrize( "values", [ - range(1000), - {f"key{i}": range(1000) for i in range(10)}, - cudf.DataFrame({f"key{i}": range(1000) for i in range(10)}), - cudf.Series(range(1000)), + range(50), + {f"{string.ascii_lowercase[i]}": range(50) for i in range(10)}, + cudf.DataFrame({f"{string.ascii_lowercase[i]}": range(50) for i in range(10)}), + cudf.Series(range(50)), ], ) def bench_isin(benchmark, dataframe, values): From b413523adf5724414a5ef1f9d74710709016b2ac Mon Sep 17 00:00:00 2001 From: Gregory Kimball Date: Wed, 7 Sep 2022 02:30:10 +0000 Subject: [PATCH 2/3] defer compute for values parameter --- python/cudf/benchmarks/API/bench_dataframe.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python/cudf/benchmarks/API/bench_dataframe.py b/python/cudf/benchmarks/API/bench_dataframe.py index bf4b6eabb98..4e49017c8a2 100644 --- a/python/cudf/benchmarks/API/bench_dataframe.py +++ b/python/cudf/benchmarks/API/bench_dataframe.py @@ -41,14 +41,14 @@ def bench_merge(benchmark, dataframe, num_key_cols): @pytest.mark.parametrize( "values", [ - range(50), - {f"{string.ascii_lowercase[i]}": range(50) for i in range(10)}, - cudf.DataFrame({f"{string.ascii_lowercase[i]}": range(50) for i in range(10)}), - cudf.Series(range(50)), + lambda: range(50), + lambda: {f"{string.ascii_lowercase[i]}": range(50) for i in range(10)}, + lambda: cudf.DataFrame({f"{string.ascii_lowercase[i]}": range(50) for i in range(10)}), + lambda: cudf.Series(range(50)), ], ) def bench_isin(benchmark, dataframe, values): - benchmark(dataframe.isin, values) + benchmark(dataframe.isin, values()) @pytest.fixture( From b80105bde969b67b2b4369aa0a8cdee3699faa20 Mon Sep 17 00:00:00 2001 From: Gregory Kimball Date: Thu, 29 Sep 2022 21:52:03 +0000 Subject: [PATCH 3/3] whitespace --- python/cudf/benchmarks/API/bench_dataframe.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/cudf/benchmarks/API/bench_dataframe.py b/python/cudf/benchmarks/API/bench_dataframe.py index 4e49017c8a2..42bfa854396 100644 --- a/python/cudf/benchmarks/API/bench_dataframe.py +++ b/python/cudf/benchmarks/API/bench_dataframe.py @@ -43,7 +43,9 @@ def bench_merge(benchmark, dataframe, num_key_cols): [ lambda: range(50), lambda: {f"{string.ascii_lowercase[i]}": range(50) for i in range(10)}, - lambda: cudf.DataFrame({f"{string.ascii_lowercase[i]}": range(50) for i in range(10)}), + lambda: cudf.DataFrame( + {f"{string.ascii_lowercase[i]}": range(50) for i in range(10)} + ), lambda: cudf.Series(range(50)), ], )