Author: Tim Felgentreff <timfelgentr...@gmail.com> Branch: Changeset: r366:daca802d08e8 Date: 2013-05-03 13:36 +0200 http://bitbucket.org/pypy/lang-smalltalk/changeset/daca802d08e8/
Log: merge default diff --git a/benchmarks.py b/benchmarks.py --- a/benchmarks.py +++ b/benchmarks.py @@ -30,13 +30,19 @@ benchmarks = output.split('\n') for s in benchmarks: if ';' in s: - name, time = s.split(';') - self.add(executable, name, time) + results = s.split(';') + if len(results) == 2: + self.add(executable, *results) + elif len(results) == 4: + self.add(executble, *results) - def add(self, executable, benchmark, result): + def add(self, executable, benchmark, result, min=None, max=None): print "Saving result %s for executable %s, benchmark %s" % ( result, executable, benchmark) - data = self.build_data(executable, benchmark, result) + if min is max is None: + data = self.build_data(executable, benchmark, result) + else: + data = self.build_extended_data(executable, benchmark, result, min, max) params = urllib.urlencode(data) response = "None" print "Saving result for executable %s, revision %s, benchmark %s" % ( @@ -89,7 +95,13 @@ # 'max': 4001.6, # Optional. Default is blank # 'min': 3995.1, # Optional. Default is blank # } - + def build_data_extended(self, executable, benchmark, result, min, max): + return dict(self.build_data(executable, benchmark, result), + **{ + 'min': str(min), + 'max': str(max) + } + ) class Archive(object): def __init__(self, filename, target, func): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit