[pypy-svn] r75578 - in pypy/benchmarks: . test

tobami at codespeak.net tobami at codespeak.net
Fri Jun 25 11:46:31 CEST 2010


Author: tobami
Date: Fri Jun 25 11:46:29 2010
New Revision: 75578

Modified:
   pypy/benchmarks/runner.py
   pypy/benchmarks/saveresults.py
   pypy/benchmarks/test/test_saveresults.py
Log:
Update saving scripts to new codespeed version


Modified: pypy/benchmarks/runner.py
==============================================================================
--- pypy/benchmarks/runner.py	(original)
+++ pypy/benchmarks/runner.py	Fri Jun 25 11:46:29 2010
@@ -34,22 +34,20 @@
     f.close()
     if upload:
         from saveresults import save
-        project = 'pypy'
+        project = 'PyPy'
         if "--jit threshold" in args:
             name = "pypy-c"
         else:
             name = "pypy-c-jit"
-        optionsname = ""
         if "psyco.sh" in pypy_c_path:
-            name = "cpython"
-            optionsname = "psyco-profile"
-            revision = 262
+            name = "cpython psyco-profile"
+            revision = 100
             project = 'cpython'
         if force_host is not None:
             host = force_host
         else:
             host = socket.gethostname()
-        save(project, revision, res, options, branch, name, optionsname, host)
+        save(project, revision, res, options, name, host)
 
 BENCHMARK_SET = ['richards', 'slowspitfire', 'django', 'spambayes',
                  'rietveld', 'html5lib', 'ai']

Modified: pypy/benchmarks/saveresults.py
==============================================================================
--- pypy/benchmarks/saveresults.py	(original)
+++ pypy/benchmarks/saveresults.py	Fri Jun 25 11:46:29 2010
@@ -8,12 +8,10 @@
 
 SPEEDURL = "http://speed.pypy.org/"
 
-def save(project, revision, results, options, branch, interpreter,
-         int_options, host, testing=False):
+def save(project, revision, results, options, interpreter, host, testing=False):
     testparams = []
     #Parse data
     data = {}
-    current_date = datetime.today()
     error = 0
         
     for b in results:
@@ -31,12 +29,10 @@
         data = {
             'commitid': revision,
             'project': project,
-            'executable_name': interpreter,
-            'executable_coptions': int_options,
+            'executable': interpreter,
             'benchmark': bench_name,
             'environment': host,
             'result_value': value,
-            'result_date': current_date,
         }
         if res_type == "ComparisonResult":
             data['std_dev'] = results['std_changed']
@@ -52,7 +48,7 @@
     params = urllib.urlencode(data)
     f = None
     response = "None"
-    info = str(datetime.today()) + ": Saving result for " + data['executable_name'] + " revision "
+    info = str(datetime.today()) + ": Saving result for " + data['executable'] + " revision "
     info += str(data['commitid']) + ", benchmark " + data['benchmark']
     print(info)
     try:

Modified: pypy/benchmarks/test/test_saveresults.py
==============================================================================
--- pypy/benchmarks/test/test_saveresults.py	(original)
+++ pypy/benchmarks/test/test_saveresults.py	Fri Jun 25 11:46:29 2010
@@ -22,12 +22,10 @@
     
     def test_good_input(self):
         '''Given correct result data, check that every result being saved has the right parameters'''
-        for resultparams in saveresults.save("pypy", 71212, self.fixture, "", "experimental", "pypy-c-jit", "gc=hybrid", 'host', True):
-            assert resultparams['project'] == "pypy"
+        for resultparams in saveresults.save("PyPy", 71212, self.fixture, "", "pypy-c-jit", 'host', True):
+            assert resultparams['project'] == "PyPy"
             assert resultparams['commitid'] == 71212
-            assert resultparams['branch'] == "experimental"
-            assert resultparams['executable_name'] == "pypy-c-jit"
-            assert resultparams['executable_coptions'] == "gc=hybrid"
+            assert resultparams['executable'] == "pypy-c-jit"
             # get dict with correct data for this benchmark
             fixturedata = []
             benchfound = False



More information about the Pypy-commit mailing list