Skip to content

Commit 1a209e7

Browse files
committed
Add test that presumably will test import time.
1 parent a6038c3 commit 1a209e7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

exercises.py

+13
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,16 @@ def entrypoint_regexp_perf():
4343
input = '0' + ' ' * 2**10 + '0' # end warmup
4444

4545
re.match(importlib_metadata.EntryPoint.pattern, input)
46+
47+
48+
def import_time_perf():
49+
"import time"
50+
import sys
51+
import importlib
52+
53+
saved = dict(sys.modules)
54+
55+
# end warmup
56+
sys.modules.clear()
57+
sys.modules.update(saved)
58+
import importlib_metadata

0 commit comments

Comments
 (0)