[pypy-svn] r59636 - in pypy/build/benchmem: . testing

xoraxax at codespeak.net xoraxax at codespeak.net
Sat Nov 1 20:53:51 CET 2008


Author: xoraxax
Date: Sat Nov  1 20:53:48 2008
New Revision: 59636

Modified:
   pypy/build/benchmem/runbench.py
   pypy/build/benchmem/testing/test_benchtool.py
Log:
Comment out an assert which is a bit too optimistic ... time only gives us resolution of 10 ms, and if the wall clock time is measured to be below it, we see 0.

Modified: pypy/build/benchmem/runbench.py
==============================================================================
--- pypy/build/benchmem/runbench.py	(original)
+++ pypy/build/benchmem/runbench.py	Sat Nov  1 20:53:48 2008
@@ -101,7 +101,8 @@
             popen = Popen(cmds, shell=True, stderr=PIPE, close_fds=True)
             if popen.wait():
                 raise Exception('Error in command ' + cmds)
-            timelines = popen.stderr.read().strip().splitlines()[-3:]
+            output = popen.stderr.read()
+            timelines = output.strip().splitlines()[-3:]
             times = {}
             for line in timelines:
                 name, time = line.split(" ", 1)

Modified: pypy/build/benchmem/testing/test_benchtool.py
==============================================================================
--- pypy/build/benchmem/testing/test_benchtool.py	(original)
+++ pypy/build/benchmem/testing/test_benchtool.py	Sat Nov  1 20:53:48 2008
@@ -290,7 +290,7 @@
     tmpdir = py.test.ensuretemp("test_basetime_half_functional")
     script = py.path.local(runbench.__file__).dirpath("runbench.py")
     benchlog = tmpdir.join("benchlog")
-    py.process.cmdexec("%s -e python2.5,python2.5 --benchlog=%s basetime" % (script, benchlog))
+    print py.process.cmdexec("%s -e python2.5,python2.5 --benchlog=%s basetime" % (script, benchlog))
 
     resultset = runbench.ResultSet()
     resultset.parse(benchlog)
@@ -304,7 +304,9 @@
     for name, timing in result1.mintimings:
         assert timing['real'] >= timing['user'] + timing['sys'] - 0.02
         # -0.02 is some skew for rounding problems
-        assert timing['real'] > 0
+
+        # XXX the resolution is very low :(
+        #assert timing['real'] > 0
 
 def test_basetime_functional():
     tmpdir = py.test.ensuretemp("test_basetime_functional")



More information about the Pypy-commit mailing list