[CalendarServer-changes] [6586] CalendarServer/trunk/contrib/performance
source_changes at macosforge.org
source_changes at macosforge.org
Wed Nov 10 11:21:55 PST 2010
Revision: 6586
http://trac.macosforge.org/projects/calendarserver/changeset/6586
Author: exarkun at twistedmatrix.com
Date: 2010-11-10 11:21:52 -0800 (Wed, 10 Nov 2010)
Log Message:
-----------
Drop the profiling results into per-backend directories
Modified Paths:
--------------
CalendarServer/trunk/contrib/performance/benchlib.sh
CalendarServer/trunk/contrib/performance/profile.sh
Modified: CalendarServer/trunk/contrib/performance/benchlib.sh
===================================================================
--- CalendarServer/trunk/contrib/performance/benchlib.sh 2010-11-10 02:26:04 UTC (rev 6585)
+++ CalendarServer/trunk/contrib/performance/benchlib.sh 2010-11-10 19:21:52 UTC (rev 6586)
@@ -10,6 +10,8 @@
# backend, and PID files will be discovered beneath it.
SOURCE=~/Projects/CalendarServer/trunk
+PIDFILE=$SOURCE/data/Logs/caldavd.pid
+
# Names of benchmarks we can run.
BENCHMARKS="event_move event_delete_attendee event_add_attendee event_change_date event_change_summary event_delete vfreebusy event"
@@ -42,11 +44,9 @@
NUM_INSTANCES=$1
shift
./run -d -n $*
- while :; do
+ while sleep 2; do
instances=($SOURCE/data/Logs/*instance*)
- if [ "${#instances[*]}" -ne "$NUM_INSTANCES" ]; then
- sleep 2
- else
+ if [ "${#instances[*]}" -eq "$NUM_INSTANCES" ]; then
break
fi
done
@@ -56,7 +56,14 @@
# it has exited.
function stop() {
./run -k || true
- while [ -e ./data/Logs/caldavd.pid ]; do
+ while :; do
+ if [ ! -e $PIDFILE ]; then
+ break
+ fi
+ pid=$(cat $PIDFILE)
+ if $(kill -0 $pid); then
+ break
+ fi
echo "Waiting for server to exit..."
sleep 1
done
Modified: CalendarServer/trunk/contrib/performance/profile.sh
===================================================================
--- CalendarServer/trunk/contrib/performance/profile.sh 2010-11-10 02:26:04 UTC (rev 6585)
+++ CalendarServer/trunk/contrib/performance/profile.sh 2010-11-10 19:21:52 UTC (rev 6586)
@@ -17,10 +17,11 @@
setbackend $backend
for benchmark in $BENCHMARKS; do
pushd $SOURCE
- mkdir -p profiling/$benchmark
- start 0 -t Single -S profiling/$benchmark
+ mkdir -p profiling/$backend/$benchmark
+ start 0 -t Single -S profiling/$backend/$benchmark
popd
- sudo ./run.sh ./benchmark --label r$REV-$backend $benchmark
+ # Chances are sudo will throw out PYTHONPATH unless we tell it not to.
+ sudo PYTHONPATH=$PYTHONPATH ./benchmark --label r$REV-$backend $benchmark
pushd $SOURCE
stop
popd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20101110/7a406457/attachment.html>
More information about the calendarserver-changes
mailing list