summaryrefslogtreecommitdiff
path: root/bench/bench.py
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2013-09-22 13:08:12 -0400
committerGary Oberbrunner <garyo@oberbrunner.com>2013-09-22 13:08:12 -0400
commit953dc41b8b720fdcec7955de67d23206214e5125 (patch)
treeb95b2144ccf82d8227cec025af152f4eadfa7282 /bench/bench.py
parent328e541f40849c270fc75f0932594d18d2e6340b (diff)
downloadscons-git-953dc41b8b720fdcec7955de67d23206214e5125.tar.gz
Result of raw 2to3 run (2to3-2.7); checkpoint for python3 conversion.
Diffstat (limited to 'bench/bench.py')
-rw-r--r--bench/bench.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bench/bench.py b/bench/bench.py
index 74dbf121b..1a98d8c21 100644
--- a/bench/bench.py
+++ b/bench/bench.py
@@ -23,7 +23,7 @@
#
# This will allow (as much as possible) us to time just the code itself,
# not Python function call overhead.
-from __future__ import division
+
import getopt
import sys
@@ -94,7 +94,7 @@ exec(open(args[0], 'rU').read())
try:
FunctionList
except NameError:
- function_names = sorted([x for x in locals().keys() if x[:4] == FunctionPrefix])
+ function_names = sorted([x for x in list(locals().keys()) if x[:4] == FunctionPrefix])
l = [locals()[f] for f in function_names]
FunctionList = [f for f in l if isinstance(f, types.FunctionType)]
@@ -113,12 +113,12 @@ def display(label, results):
total = 0.0
for r in results:
total += r
- print " %8.3f" % ((total * 1e6) / len(results)), ':', label
+ print(" %8.3f" % ((total * 1e6) / len(results)), ':', label)
for func in FunctionList:
if func.__doc__: d = ' (' + func.__doc__ + ')'
else: d = ''
- print func.__name__ + d + ':'
+ print(func.__name__ + d + ':')
for label, args, kw in Data:
r = timer(func, *args, **kw)