[pypy-commit] pypy py3.6: Update warning: perf is now called pyperf

rlamy pypy.commits at gmail.com
Wed Jun 12 10:32:27 EDT 2019


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3.6
Changeset: r96802:c52c6b7bcc14
Date: 2019-06-12 15:31 +0100
http://bitbucket.org/pypy/pypy/changeset/c52c6b7bcc14/

Log:	Update warning: perf is now called pyperf

diff --git a/lib-python/3/test/test_timeit.py b/lib-python/3/test/test_timeit.py
--- a/lib-python/3/test/test_timeit.py
+++ b/lib-python/3/test/test_timeit.py
@@ -366,9 +366,9 @@
     def test_main_recommends_perf(self):
         s = self.run_main(seconds_per_increment=2.0, switches=['-n35', '-s', 'print("CustomSetup")'])
         self.assertIn(dedent("""\
-            WARNING: timeit is a very unreliable tool. use perf or something else for real measurements
+            WARNING: timeit is a very unreliable tool. use pyperf or something else for real measurements
         """), s)
-        self.assertIn("-m pip install perf", s)
+        self.assertIn("-m pip install pyperf", s)
 
     def autorange(self, callback=None):
         timer = FakeTimer(seconds_per_increment=0.001)
diff --git a/lib-python/3/timeit.py b/lib-python/3/timeit.py
--- a/lib-python/3/timeit.py
+++ b/lib-python/3/timeit.py
@@ -310,10 +310,10 @@
             return 0
     setup = "\n".join(setup) or "pass"
 
-    print("WARNING: timeit is a very unreliable tool. use perf or something else for real measurements")
+    print("WARNING: timeit is a very unreliable tool. use pyperf or something else for real measurements")
     executable = os.path.basename(sys.executable)
-    print("%s -m pip install perf" % executable)
-    print("%s -m perf timeit %s" % (
+    print("%s -m pip install pyperf" % executable)
+    print("%s -m pyperf timeit %s" % (
         executable,
         " ".join([(arg if arg.startswith("-") else repr(arg))
                         for arg in origargs]), ))


More information about the pypy-commit mailing list