Skip to content

Commit 02f788e

Browse files
committed
Capture performance of interpreter startup. Ref pypa#3006.
1 parent 9f37366 commit 02f788e

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

exercises.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def measure_startup_perf():
2+
# run by pytest_perf
3+
import subprocess
4+
import sys # end warmup
5+
6+
subprocess.check_call([sys.executable, '-c', 'pass'])

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ testing =
5050
# workaround for jaraco/skeleton#22
5151
python_implementation != "PyPy"
5252
pytest-enabler >= 1.0.1
53+
pytest-perf
5354

5455
# local
5556
mock

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ extras = testing
1515
passenv =
1616
SETUPTOOLS_USE_DISTUTILS
1717
windir # required for test_pkg_resources
18+
# honor git config in pytest-perf
19+
HOME
1820

1921
[testenv:integration]
2022
deps = {[testenv]deps}

0 commit comments

Comments
 (0)