Skip to content

Commit

Permalink
Add test that presumably will test import time.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jan 28, 2024
1 parent a6038c3 commit 1a209e7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions exercises.py
Expand Up @@ -43,3 +43,16 @@ def entrypoint_regexp_perf():
input = '0' + ' ' * 2**10 + '0' # end warmup

re.match(importlib_metadata.EntryPoint.pattern, input)


def import_time_perf():
"import time"
import sys
import importlib

saved = dict(sys.modules)

# end warmup
sys.modules.clear()
sys.modules.update(saved)
import importlib_metadata

0 comments on commit 1a209e7

Please sign in to comment.