Skip to content

Commit 525ddd6

Browse files
committed
test: more tweaks to benchmarking
1 parent cf6763a commit 525ddd6

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

lab/benchmark/benchmark.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,20 @@ def prep_environment(self, env):
144144
"""
145145
pass
146146

147+
@contextlib.contextmanager
147148
def tweak_coverage_settings(
148149
self, settings: Iterable[Tuple[str, Any]]
149150
) -> Iterator[None]:
150151
"""Tweak the coverage settings.
151152
152153
NOTE: This is not properly factored, and is only used by ToxProject now!!!
153154
"""
155+
yield
156+
157+
def pre_check(self, env):
158+
pass
159+
160+
def post_check(self, env):
154161
pass
155162

156163
def run_no_coverage(self, env):

lab/benchmark/run.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
)
2626

2727

28-
if 1:
28+
if 0:
2929
run_experiment(
3030
py_versions=[
3131
Python(3, 9),
@@ -52,3 +52,24 @@
5252
(".2 dynctx cost", "702.dynctx", "702"),
5353
],
5454
)
55+
56+
57+
if 1:
58+
# Compare 3.11 vs 3.12
59+
run_experiment(
60+
py_versions=[
61+
Python(3, 11),
62+
Python(3, 12),
63+
],
64+
cov_versions=[
65+
Coverage("732", "coverage==7.3.2"),
66+
],
67+
projects=[
68+
ProjectDateutil(),
69+
],
70+
rows=["cov", "proj"],
71+
column="pyver",
72+
ratios=[
73+
("3.12 vs 3.11", "python3.12", "python3.11"),
74+
],
75+
)

0 commit comments

Comments
 (0)