]> granicus.if.org Git - python/commitdiff
Move importlib.test.benchmark to Tools/importbench to make it more
authorBrett Cannon <brett@python.org>
Fri, 20 Jul 2012 18:54:53 +0000 (14:54 -0400)
committerBrett Cannon <brett@python.org>
Fri, 20 Jul 2012 18:54:53 +0000 (14:54 -0400)
visible and to place it with other micro-benchmarks (e.g.
stringbench).

Misc/NEWS
Tools/importbench/README [new file with mode: 0644]
Tools/importbench/importbench.py [moved from Lib/test/test_importlib/benchmark.py with 98% similarity]

index 48877fe97da8258e3d9d44978aa90d8e630ffd38..c2b9563632817780d97d8853a0eb4d2e25a14daf 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -154,6 +154,8 @@ Extension Modules
 Tools/Demos
 -----------
 
+- Move importlib.test.benchmark to Tools/importbench.
+
 - Issue #12605: The gdb hooks for debugging CPython (within Tools/gdb) have
   been enhanced to show information on more C frames relevant to CPython within
   the "py-bt" and "py-bt-full" commands:
diff --git a/Tools/importbench/README b/Tools/importbench/README
new file mode 100644 (file)
index 0000000..81a5544
--- /dev/null
@@ -0,0 +1,6 @@
+Importbench is a set of micro-benchmarks for various import scenarios.
+
+It should not be used as an overall benchmark of import performance, but rather
+an easy way to measure impact of possible code changes. For a real-world
+benchmark of import, use the normal_startup benchmark from
+hg.python.org/benchmarks.
similarity index 98%
rename from Lib/test/test_importlib/benchmark.py
rename to Tools/importbench/importbench.py
index 183e8180c94a8d77b058b8a6f0645c7f26d3256b..714c0e427f9c872bbf22ad082530f87c2fdb98f6 100644 (file)
@@ -4,8 +4,8 @@ The assumption is made that this benchmark is run in a fresh interpreter and
 thus has no external changes made to import-related attributes in sys.
 
 """
-from . import util
-from .source import util as source_util
+from test.test_importlib import util
+from test.test_importlib.source import util as source_util
 import decimal
 import imp
 import importlib