[pypy-commit] benchmarks default: Use executable as variabel/parameter name like codespeed.

csenger noreply at buildbot.pypy.org
Mon Jan 30 18:56:23 CET 2012


Author: Carsten Senger <senger at rehfisch.de>
Branch: 
Changeset: r165:69cf04577df2
Date: 2012-01-22 12:57 +0100
http://bitbucket.org/pypy/benchmarks/changeset/69cf04577df2/

Log:	Use executable as variabel/parameter name like codespeed.

	Also add the project name as a parameter to perform_upload.

diff --git a/runner.py b/runner.py
--- a/runner.py
+++ b/runner.py
@@ -3,30 +3,31 @@
 """
 
 import json
+import socket
 import sys
+
+import benchmarks
+from saveresults import save
 from unladen_swallow import perf
-import benchmarks
-import socket
 
 
 def perform_upload(pypy_c_path, args, force_host, options, res, revision,
-                   changed=True, postfix='', branch='default'):
-    from saveresults import save
-    project = 'PyPy'
-    if "--jit" in args:
-        name = "pypy-c" + postfix
-    else:
-        name = "pypy-c-jit" + postfix
+                   changed=True, postfix='', branch='default', project='PyPy',
+                   executable=None):
+    if executable is None:
+        if "--jit" in args:
+            executable = "pypy-c" + postfix
+        else:
+            executable = "pypy-c-jit" + postfix
+
     if "psyco.sh" in pypy_c_path:
-        name = "cpython psyco-profile"
+        executable = "cpython psyco-profile"
         revision = 100
         project = 'cpython'
-    if force_host is not None:
-        host = force_host
-    else:
-        host = socket.gethostname()
-    print save(project, revision, res, options, name, host, changed=changed,
-               branch=branch)
+
+    host = force_host if force_host else socket.gethostname()
+    print save(project, revision, res, options, executable, host,
+               changed=changed, branch=branch)
 
 
 def run_and_store(benchmark_set, result_filename, pypy_c_path, revision=0,
@@ -55,6 +56,7 @@
         'branch': branch,
         }))
     f.close()
+
     if upload:
         if ',' in args:
             argsbase, argschanged = args.split(',')
diff --git a/saveresults.py b/saveresults.py
--- a/saveresults.py
+++ b/saveresults.py
@@ -32,7 +32,7 @@
 SPEEDURL = "http://speed.pypy.org/"
 
 
-def save(project, revision, results, options, interpreter, host, testing=False,
+def save(project, revision, results, options, executeable, host, testing=False,
          changed=True, branch='default'):
     testparams = []
     #Parse data
@@ -68,7 +68,7 @@
         data = {
             'commitid': revision,
             'project': project,
-            'executable': interpreter,
+            'executable': executeable,
             'benchmark': bench_name,
             'environment': host,
             'result_value': value,


More information about the pypy-commit mailing list