[pypy-commit] buildbot default: Implement cPythonBenchmark BuildFactory and rename builder
csenger
noreply at buildbot.pypy.org
Mon Jan 30 19:35:36 CET 2012
Author: Carsten Senger <senger at rehfisch.de>
Branch:
Changeset: r625:099a467986cf
Date: 2012-01-20 23:55 +0100
http://bitbucket.org/pypy/buildbot/changeset/099a467986cf/
Log: Implement cPythonBenchmark BuildFactory and rename builder
* Add new class builds.cPythonBenchmark for speed.python.org
related code and clean up builds.JITBenchmark
* Add repourl kwarg to setup_steps()
* rename builder from jit-benchmark-linux-x86-64 to
cpython-2-benchmark-x86-64
diff --git a/bot2/pypybuildbot/builds.py b/bot2/pypybuildbot/builds.py
--- a/bot2/pypybuildbot/builds.py
+++ b/bot2/pypybuildbot/builds.py
@@ -192,10 +192,10 @@
command = "hg update --clean",
workdir = workdir))
-def setup_steps(platform, factory, workdir=None):
+def setup_steps(platform, factory, workdir=None,
+ repourl='https://bitbucket.org/pypy/pypy/'):
# XXX: this assumes that 'hg' is in the path
import getpass
- repourl = 'https://bitbucket.org/pypy/pypy/'
if getpass.getuser() == 'antocuni':
# for debugging
repourl = '/home/antocuni/pypy/default'
@@ -313,21 +313,16 @@
workdir='.',
blocksize=100*1024))
+
class JITBenchmark(factory.BuildFactory):
- def __init__(self, platform='linux', host='tannit', postfix=None):
+ def __init__(self, platform='linux', postfix=None):
factory.BuildFactory.__init__(self)
setup_steps(platform, self)
#
repourl = 'https://bitbucket.org/pypy/benchmarks'
update_hg(platform, self, repourl, 'benchmarks', use_branch=False)
- #
- if host == 'tannit':
- lock = TannitCPU
- elif host == 'speed_python':
- lock = SpeedPythonCPU
- else:
- assert False, 'unknown host %s' % host
+ lock = TannitCPU
#
self.addStep(
Translate(
@@ -363,3 +358,67 @@
self.addStep(transfer.FileUpload(slavesrc="benchmarks/result.json",
masterdest=WithProperties(resfile),
workdir="."))
+
+
+class CPythonBenchmark(factory.BuildFactory):
+ '''
+ Check out and build CPython and run the benchmarks with it.
+ '''
+ def __init__(self, platform='linux64'):
+ factory.BuildFactory.__init__(self)
+
+ # checks out and updates the repo
+ setup_steps(platform, self, repourl='http://hg.python.org/cpython')
+
+ # check out and update benchmarks
+ repourl = 'https://bitbucket.org/pypy/benchmarks'
+ update_hg(platform, self, repourl, 'benchmarks', use_branch=False)
+
+ lock = SpeedPythonCPU
+
+ self.addStep(ShellCmd(
+ description="configure cpython",
+ command=["./configure"],
+ timeout=300))
+
+ self.addStep(ShellCmd(
+ description="cleanup cpython",
+ command=["make", "clean"],
+ timeout=300))
+
+ self.addStep(ShellCmd(
+ description="make cpython",
+ command=["make"],
+ timeout=600))
+
+ # self.addStep(ShellCmd(
+ # description="test cpython",
+ # command=["make", "buildbottest"],
+ # haltOnFailure=False,
+ # timeout=600))
+
+ cpython_interpreter = '../build/python'
+ self.addStep(ShellCmd(
+ # this step needs exclusive access to the CPU
+ locks=[lock.access('exclusive')],
+ description="run benchmarks on top of cpython",
+ command=["python", "runner.py", '--output-filename', 'result.json',
+ '--revision', WithProperties('%(got_revision)s'),
+ '--branch', WithProperties('%(branch)s'),
+ '-p', cpython_interpreter,
+ '--baseline', cpython_interpreter,
+ ],
+ workdir='./benchmarks',
+ timeout=3600))
+
+ # a bit obscure hack to get both os.path.expand and a property
+ filename = '%(got_revision)s'
+ resultfile = os.path.expanduser("~/bench_results/%s.json" % filename)
+ self.addStep(transfer.FileUpload(slavesrc="benchmarks/result.json",
+ masterdest=WithProperties(resultfile),
+ workdir="."))
+
+ self.addStep(ShellCmd(
+ description="distcleanup cpython",
+ command=["make", "distclean"],
+ timeout=300))
diff --git a/bot2/pypybuildbot/master.py b/bot2/pypybuildbot/master.py
--- a/bot2/pypybuildbot/master.py
+++ b/bot2/pypybuildbot/master.py
@@ -130,9 +130,7 @@
pypyJITBenchmarkFactory64_tannit = pypybuilds.JITBenchmark(platform='linux64',
postfix='-64')
-pypyJITBenchmarkFactory64_speed = pypybuilds.JITBenchmark(platform='linux64',
- postfix='-64',
- host='speed_python')
+cPythonBenchmarkFactory64 = pypybuilds.CPythonBenchmark(platform='linux64')
LINUX32 = "own-linux-x86-32"
@@ -157,7 +155,7 @@
JITONLYLINUX32 = "jitonly-own-linux-x86-32"
JITBENCH = "jit-benchmark-linux-x86-32"
JITBENCH64 = "jit-benchmark-linux-x86-64"
-JITBENCH64_2 = "jit-benchmark-linux-x86-64-2"
+CPYTHON2_64 = "cpython-2-benchmark-x86-64"
BuildmasterConfig = {
@@ -204,7 +202,7 @@
Nightly("nightly-0-00", [
JITBENCH, # on tannit32, uses 1 core (in part exclusively)
JITBENCH64, # on tannit64, uses 1 core (in part exclusively)
- JITBENCH64_2, # on speed.python.org, uses 1 core (in part exclusively)
+ CPYTHON2_64, # on speed.python.org, uses 1 core (in part exclusively)
MACOSX32, # on minime
], branch=None, hour=0, minute=0),
#
@@ -304,10 +302,10 @@
"category": "benchmark-run",
# the locks are acquired with fine grain inside the build
},
- {"name": JITBENCH64_2,
+ {"name": CPYTHON2_64,
"slavenames": ["speed-python-64"],
- "builddir": JITBENCH64_2,
- "factory": pypyJITBenchmarkFactory64_speed,
+ "builddir": CPYTHON2_64,
+ "factory": cPythonBenchmarkFactory64,
"category": "benchmark-run",
# the locks are acquired with fine grain inside the build
},
More information about the pypy-commit
mailing list