[pypy-svn] r58346 - pypy/build/benchmem
hpk at codespeak.net
hpk at codespeak.net
Mon Sep 22 22:13:21 CEST 2008
Author: hpk
Date: Mon Sep 22 22:13:20 2008
New Revision: 58346
Modified:
pypy/build/benchmem/runbench.py
Log:
remove benchlog by default, use "--append" to add to it
Modified: pypy/build/benchmem/runbench.py
==============================================================================
--- pypy/build/benchmem/runbench.py (original)
+++ pypy/build/benchmem/runbench.py Mon Sep 22 22:13:20 2008
@@ -181,6 +181,8 @@
help="Python executable to use for recording benchmarks")
parser.add_option("-l", "--benchlog", action="store", dest="benchlog", default="bench.log",
help="logfile for recording benchmark measurements")
+parser.add_option("-a", "--append", action="store_true", dest="append", default="bench.log",
+ help="append to logfile")
def getbenchfiles(options, args):
if args:
@@ -199,12 +201,15 @@
if benchlog is None:
benchlog = "bench.log"
return py.path.local(benchlog)
+
if __name__ == '__main__':
(options, args) = parser.parse_args()
names = getbenchfiles(options, args)
benchlog = getbenchlog(options)
+ if not options.append and benchlog.check():
+ benchlog.remove()
for executable in options.executable.split(","):
if not executable:
continue
More information about the Pypy-commit
mailing list