Skip to content

Commit 9757b40

Browse files
jaracoclaude
andcommitted
Add a benchmark for import time of importlib_metadata.
Relies on pytest-perf 0.17 for import time testing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 0f88c48 commit 9757b40

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

exercises.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,8 @@ def normalize_perf():
5252
import importlib_metadata # end warmup
5353

5454
importlib_metadata.Prepared.normalize('sample')
55+
56+
57+
def import_time():
58+
"import"
59+
import importlib_metadata # noqa: F401

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ test = [
3838
# local
3939
"packaging",
4040
"pyfakefs",
41-
"pytest-perf >= 0.16",
41+
"pytest-perf >= 0.17",
4242
]
4343

4444
doc = [

0 commit comments

Comments
 (0)