[pypy-svn] r59965 - pypy/build/benchmem/benchmark

xoraxax at codespeak.net xoraxax at codespeak.net
Mon Nov 17 21:39:16 CET 2008


Author: xoraxax
Date: Mon Nov 17 21:39:16 2008
New Revision: 59965

Added:
   pypy/build/benchmem/benchmark/gcbench_runner.py
Modified:
   pypy/build/benchmem/benchmark/gcbench.py
Log:
Introduce gcbench runner for benchtime.

Modified: pypy/build/benchmem/benchmark/gcbench.py
==============================================================================
--- pypy/build/benchmem/benchmark/gcbench.py	(original)
+++ pypy/build/benchmem/benchmark/gcbench.py	Mon Nov 17 21:39:16 2008
@@ -61,6 +61,8 @@
 kMinTreeDepth = 4
 kMaxTreeDepth = 16
 
+do_print_time = False
+
 def tree_size(i):
     "Nodes used by a tree of a given size"
     return (1 << (i + 1)) - 1
@@ -146,6 +148,8 @@
         raise Failed
 
     t_finish = time.time()
+    if do_print_time:
+        print "T: %f" % (t_finish - t_start,)
 
 class Failed(Exception):
     pass

Added: pypy/build/benchmem/benchmark/gcbench_runner.py
==============================================================================
--- (empty file)
+++ pypy/build/benchmem/benchmark/gcbench_runner.py	Mon Nov 17 21:39:16 2008
@@ -0,0 +1,11 @@
+import math
+
+import gcbench
+
+
+def main():
+    base_depth = 8
+    gcbench.kStretchTreeDepth = base_depth + 2
+    gcbench.kLongLivedTreeDepth = base_depth
+    gcbench.do_print_time = True
+    gcbench.main()



More information about the Pypy-commit mailing list