diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48a3c464b8fe2..e8834bd509bf0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,14 +74,10 @@ jobs: asv check -E existing git remote add upstream https://github.com/pandas-dev/pandas.git git fetch upstream - if git diff upstream/master --name-only | grep -q "^asv_bench/"; then - asv machine --yes - asv dev | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log - if grep "failed" benchmarks.log > /dev/null ; then - exit 1 - fi - else - echo "Benchmarks did not run, no changes detected" + asv machine --yes + asv dev | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log + if grep "failed" benchmarks.log > /dev/null ; then + exit 1 fi if: always() diff --git a/asv_bench/benchmarks/indexing.py b/asv_bench/benchmarks/indexing.py index 4fd91c8aafe4b..38d1f64bd5f4e 100644 --- a/asv_bench/benchmarks/indexing.py +++ b/asv_bench/benchmarks/indexing.py @@ -3,6 +3,7 @@ lower-level methods directly on Index and subclasses, see index_object.py, indexing_engine.py, and index_cached.py """ +import string import warnings import numpy as np @@ -255,6 +256,7 @@ def setup(self, index): "non_monotonic": CategoricalIndex(list("abc" * N)), } self.data = indices[index] + self.data_unique = CategoricalIndex(list(string.printable)) self.int_scalar = 10000 self.int_list = list(range(10000)) @@ -281,7 +283,7 @@ def time_get_loc_scalar(self, index): self.data.get_loc(self.cat_scalar) def time_get_indexer_list(self, index): - self.data.get_indexer(self.cat_list) + self.data_unique.get_indexer(self.cat_list) class MethodLookup: