[pypy-commit] benchmarks default: pass the --branch option through all layers until it's actually included in the request to codespeed. This finally enables support for per-branch benchmarks :-)
antocuni
noreply at buildbot.pypy.org
Thu Aug 11 12:03:59 CEST 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r140:5607f5065ea7
Date: 2011-08-11 12:06 +0200
http://bitbucket.org/pypy/benchmarks/changeset/5607f5065ea7/
Log: pass the --branch option through all layers until it's actually
included in the request to codespeed. This finally enables support
for per-branch benchmarks :-)
diff --git a/runner.py b/runner.py
--- a/runner.py
+++ b/runner.py
@@ -9,7 +9,7 @@
import socket
def perform_upload(pypy_c_path, args, force_host, options, res, revision,
- changed=True, postfix=''):
+ changed=True, postfix='', branch='default'):
from saveresults import save
project = 'PyPy'
if "--jit" in args:
@@ -24,7 +24,7 @@
host = force_host
else:
host = socket.gethostname()
- print save(project, revision, res, options, name, host, changed=changed)
+ print save(project, revision, res, options, name, host, changed=changed, branch=branch)
def run_and_store(benchmark_set, result_filename, pypy_c_path, revision=0,
@@ -60,9 +60,9 @@
argsbase, argschanged = args, args
if 'pypy' in baseline:
perform_upload(pypy_c_path, argsbase, force_host, options, res,
- revision, changed=False, postfix=postfix)
+ revision, changed=False, postfix=postfix, branch=branch)
perform_upload(pypy_c_path, argschanged, force_host, options, res,
- revision, changed=True, postfix=postfix)
+ revision, changed=True, postfix=postfix, branch=branch)
BENCHMARK_SET = ['richards', 'slowspitfire', 'django', 'spambayes',
'rietveld', 'html5lib', 'ai']
@@ -121,7 +121,7 @@
options.revision, args=options.args, upload=options.upload,
force_host=options.force_host, fast=options.fast,
baseline=options.baseline, full_store=options.full_store,
- postfix=options.postfix)
+ postfix=options.postfix, branch=options.branch)
if __name__ == '__main__':
main(sys.argv[1:])
diff --git a/saveresults.py b/saveresults.py
--- a/saveresults.py
+++ b/saveresults.py
@@ -28,7 +28,7 @@
SPEEDURL = "http://speed.pypy.org/"
def save(project, revision, results, options, interpreter, host, testing=False,
- changed=True):
+ changed=True, branch='default'):
testparams = []
#Parse data
data = {}
@@ -67,7 +67,7 @@
'benchmark': bench_name,
'environment': host,
'result_value': value,
- 'branch': 'default',
+ 'branch': branch,
}
if value is None:
print "Ignoring skipped result", data
@@ -103,6 +103,7 @@
elif hasattr(e, 'code'):
response = '\n The server couldn\'t fulfill the request'
response = "".join([response] + e.readlines())
+ print response
with open('error.html', 'w') as error_file:
error_file.write(response)
print("Server (%s) response written to error.html" % (SPEEDURL,))
More information about the pypy-commit
mailing list