[CalendarServer-changes] [6204] CalendarServer/trunk/contrib/performance
source_changes at macosforge.org
source_changes at macosforge.org
Mon Aug 30 11:10:59 PDT 2010
Revision: 6204
http://trac.macosforge.org/projects/calendarserver/changeset/6204
Author: exarkun at twistedmatrix.com
Date: 2010-08-30 11:10:57 -0700 (Mon, 30 Aug 2010)
Log Message:
-----------
Actually get the benchmark and dtrace processes running properly
Modified Paths:
--------------
CalendarServer/trunk/contrib/performance/benchmark.py
CalendarServer/trunk/contrib/performance/sample.sh
Modified: CalendarServer/trunk/contrib/performance/benchmark.py
===================================================================
--- CalendarServer/trunk/contrib/performance/benchmark.py 2010-08-30 16:30:52 UTC (rev 6203)
+++ CalendarServer/trunk/contrib/performance/benchmark.py 2010-08-30 18:10:57 UTC (rev 6204)
@@ -67,7 +67,7 @@
if self.started is None:
self.done.callback(None)
else:
- self.started.errback(RuntimeError("Exited too soon: %r" % (self._out,)))
+ self.started.errback(RuntimeError("Exited too soon: %r/%r" % (self._out, self._err)))
@@ -188,19 +188,20 @@
started = Deferred()
stopped = Deferred()
proto = IOMeasureConsumer(started, stopped, _DTraceParser(self))
- process = reactor.spawnProcess(
- proto,
- ["/usr/sbin/dtrace",
- # process preprocessor macros
- "-C",
- # search for include targets in the source directory containing this file
- "-I", dirname(__file__),
- # suppress most implicitly generated output (which would mess up our parser)
- "-q",
- # make this pid the target
- "-p", str(pid),
- # load this script
- "-s", self._dScript])
+ command = [
+ "/usr/sbin/dtrace",
+ # process preprocessor macros
+ "-C",
+ # search for include targets in the source directory containing this file
+ "-I", dirname(__file__),
+ # suppress most implicitly generated output (which would mess up our parser)
+ "-q",
+ # make this pid the target
+ "-p", str(pid),
+ # load this script
+ "-s", self._dScript]
+ print command
+ process = reactor.spawnProcess(proto, command[0], command)
def eintr(reason):
reason.trap(DTraceBug)
print 'Dtrace startup failed (', reason.getErrorMessage().strip(), '), retrying.'
Modified: CalendarServer/trunk/contrib/performance/sample.sh
===================================================================
--- CalendarServer/trunk/contrib/performance/sample.sh 2010-08-30 16:30:52 UTC (rev 6203)
+++ CalendarServer/trunk/contrib/performance/sample.sh 2010-08-30 18:10:57 UTC (rev 6204)
@@ -14,7 +14,16 @@
LOGS=$2
RESULTS=$3
+function stop() {
+ ./run -k || true
+ while [ -e ./data/Logs/caldavd.pid ]; do
+ echo "Waiting for server to exit..."
+ sleep 1
+ done
+}
+
pushd $SOURCE
+stop
svn st --no-ignore | grep '^[?I]' | cut -c9- | xargs rm -r
svn up -r$REV .
python setup.py build_ext -i
@@ -23,16 +32,13 @@
for backend in $BACKENDS; do
./setbackend $SOURCE/conf/caldavd-test.plist $backend > $SOURCE/conf/caldavd-dev.plist
pushd $SOURCE
- ./run -k || true
- while [ -e ./data/Logs/caldavd.pid ]; do
- echo "Waiting for server to exit..."
- sleep 1
- done
+ stop
rm -rf data/
./run -d -n
- sleep 5
+ sleep 2
+ echo "instance pid files" $SOURCE/data/Logs/*instance*
popd
- sudo ./benchmark --label r$REV-$backend --log-directory $LOGS $BENCHMARKS
+ sudo PYTHONPATH=$PYTHONPATH ./benchmark --label r$REV-$backend --log-directory $LOGS $BENCHMARKS
data=`echo -n r$REV-$backend*`
for p in 1 9 81; do
for b in $BENCHMARKS; do
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100830/8548d690/attachment.html>
More information about the calendarserver-changes
mailing list