[pypy-commit] benchmarks default: miscellaneous changes
Raemi
noreply at buildbot.pypy.org
Tue Aug 19 13:26:41 CEST 2014
Author: Remi Meier <remi.meier at inf.ethz.ch>
Branch:
Changeset: r275:c45103668651
Date: 2014-08-19 13:26 +0200
http://bitbucket.org/pypy/benchmarks/changeset/c45103668651/
Log: miscellaneous changes
diff --git a/multithread/bench.py b/multithread/bench.py
--- a/multithread/bench.py
+++ b/multithread/bench.py
@@ -86,6 +86,7 @@
finally:
if not args.q:
print "== times ==\n", "\n".join(map(str, times))
+ print "== times short ==\n", str(times[-min(5, len(times)):])
print "== reported results ==\n", "\n".join(
map(str, filter(None, results)))
diff --git a/multithread/common/abstract_threading.py b/multithread/common/abstract_threading.py
--- a/multithread/common/abstract_threading.py
+++ b/multithread/common/abstract_threading.py
@@ -4,7 +4,7 @@
try:
from atomic import (atomic, getsegmentlimit, print_abort_info,
- hint_commit_soon)
+ hint_commit_soon, is_atomic)
except:
atomic = RLock()
def getsegmentlimit():
@@ -13,6 +13,8 @@
pass
def hint_commit_soon():
pass
+ def is_atomic():
+ return atomic._RLock__count > 0
class TLQueue_concurrent(object):
diff --git a/multithread/raytrace/raytrace.py b/multithread/raytrace/raytrace.py
--- a/multithread/raytrace/raytrace.py
+++ b/multithread/raytrace/raytrace.py
@@ -7,15 +7,15 @@
print_abort_info, hint_commit_soon)
import time
-import platform
-if platform.python_implementation() == "Jython":
- # be fair to jython and don't use a lock where none is required:
- class fakeatomic:
- def __enter__(self):
- pass
- def __exit__(self,*args):
- pass
- atomic = fakeatomic()
+#import platform
+#if platform.python_implementation() == "Jython":
+# # be fair to jython and don't use a lock where none is required:
+# class fakeatomic:
+# def __enter__(self):
+# pass
+# def __exit__(self,*args):
+# pass
+# atomic = fakeatomic()
AMBIENT = 0.1
More information about the pypy-commit
mailing list