Skip to content

Commit 51606c3

Browse files
committed
cleanup
1 parent 7e996bc commit 51606c3

File tree

2 files changed

+5
-28
lines changed

2 files changed

+5
-28
lines changed

.github/workflows/benchmark.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ jobs:
6666
6767
- name: Compare benchmarks
6868
run: |
69-
asv compare refs/bm/merge-target refs/bm/pr --
69+
asv compare --factor 1.2 --split refs/bm/merge-target refs/bm/pr --
70+
7071
- name: Fail if any benchmarks have slowed down too much
7172
run: |
72-
asv compare --factor 1.2 --split refs/bm/merge-target refs/bm/pr
73-
! asv compare --factor 1.2 --split refs/bm/merge-target refs/bm/pr | grep -q "got worse"
73+
! asv compare --factor 1.2 --split refs/bm/merge-target refs/bm/pr 2> /dev/null | grep -q "got worse"

bindings/python/benchmarks/benchmarks.py

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,6 @@ class Read(ABC):
114114
def setup(self):
115115
raise NotImplementedError
116116

117-
# We need this because the naive methods don't always convert nested objects.
118-
@staticmethod # noqa: B027
119-
def exercise_table(table):
120-
pass
121-
122117
def time_conventional_ndarray(self):
123118
collection = db.benchmark
124119
cursor = collection.find(projection={"_id": 0})
@@ -147,13 +142,11 @@ def time_to_pandas(self):
147142
def time_conventional_arrow(self):
148143
c = db.benchmark
149144
f = list(c.find({}, projection={"_id": 0}))
150-
table = pa.Table.from_pylist(f)
151-
self.exercise_table(table)
145+
pa.Table.from_pylist(f)
152146

153147
def time_to_arrow(self):
154148
c = db.benchmark
155-
table = find_arrow_all(c, {}, schema=self.schema, projection={"_id": 0})
156-
self.exercise_table(table)
149+
find_arrow_all(c, {}, schema=self.schema, projection={"_id": 0})
157150

158151
def time_conventional_polars(self):
159152
collection = db.benchmark
@@ -211,14 +204,6 @@ def setup(self):
211204
% (N_DOCS, len(BSON.encode(base_dict)) // 1024, len(base_dict))
212205
)
213206

214-
# We need this because the naive methods don't always convert nested objects.
215-
@staticmethod
216-
def exercise_table(table):
217-
[
218-
[[n for n in i.values] if isinstance(i, pa.ListScalar) else i for i in column]
219-
for column in table.columns
220-
]
221-
222207
# All of the following tests are being skipped because NumPy/Pandas do not work with nested arrays.
223208
def time_to_numpy(self):
224209
pass
@@ -260,14 +245,6 @@ def setup(self):
260245
% (N_DOCS, len(BSON.encode(base_dict)) // 1024, len(base_dict))
261246
)
262247

263-
# We need this because the naive methods don't always convert nested objects.
264-
@staticmethod
265-
def exercise_table(table):
266-
[
267-
[[n for n in i.values()] if isinstance(i, pa.StructScalar) else i for i in column]
268-
for column in table.columns
269-
]
270-
271248
# All of the following tests are being skipped because NumPy/Pandas do not work with nested documents.
272249
def time_to_numpy(self):
273250
pass

0 commit comments

Comments
 (0)