[CalendarServer-changes] [6642] CalendarServer/trunk/contrib/performance

source_changes at macosforge.org source_changes at macosforge.org
Tue Nov 16 12:07:19 PST 2010


Revision: 6642
          http://trac.macosforge.org/projects/calendarserver/changeset/6642
Author:   exarkun at twistedmatrix.com
Date:     2010-11-16 12:07:16 -0800 (Tue, 16 Nov 2010)
Log Message:
-----------
Capture the master pid as well as the instance pids; fix some bugs with the previous attempt to read the conf plist, too.

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/benchlib.sh
    CalendarServer/trunk/contrib/performance/benchmark.py
    CalendarServer/trunk/contrib/performance/sample.sh

Modified: CalendarServer/trunk/contrib/performance/benchlib.sh
===================================================================
--- CalendarServer/trunk/contrib/performance/benchlib.sh	2010-11-16 19:08:46 UTC (rev 6641)
+++ CalendarServer/trunk/contrib/performance/benchlib.sh	2010-11-16 20:07:16 UTC (rev 6642)
@@ -13,8 +13,6 @@
 # The plist the server will respect.
 CONF=$SOURCE/conf/caldavd-dev.plist
 
-PIDFILE=$SOURCE/data/Logs/caldavd.pid
-
 # Names of benchmarks we can run.
 BENCHMARKS="find_calendars event_move event_delete_attendee event_add_attendee event_change_date event_change_summary event_delete vfreebusy event"
 
@@ -24,6 +22,8 @@
 # Codespeed add-result location.
 ADDURL=http://localhost:8000/result/add/
 
+EXTRACT=$(PWD)/extractconf
+
 # Change the config beneath $SOURCE to use a particular database backend.
 function setbackend() {
   ./setbackend $SOURCE/conf/caldavd-test.plist $1 > $CONF
@@ -45,8 +45,8 @@
 # (which is only a weak metric for "the server is ready to use").
 function start() {
   NUM_INSTANCES=$1
-  PIDDIR=$SOURCE/$(extractconf $CONF RunRoot)
-  
+  PIDDIR=$SOURCE/$($EXTRACT $CONF ServerRoot)/$($EXTRACT $CONF RunRoot)
+
   shift
   ./run -d -n $*
   while sleep 2; do
@@ -61,6 +61,7 @@
 # Stop the CalendarServer in the current directory.  Only return after
 # it has exited.
 function stop() {
+  PIDFILE=$SOURCE/$($EXTRACT $CONF ServerRoot)/$($EXTRACT $CONF RunRoot)/$($EXTRACT $CONF PIDFile)
   ./run -k || true
   while :; do
       pid=$(cat $PIDFILE 2>/dev/null || true)

Modified: CalendarServer/trunk/contrib/performance/benchmark.py
===================================================================
--- CalendarServer/trunk/contrib/performance/benchmark.py	2010-11-16 19:08:46 UTC (rev 6641)
+++ CalendarServer/trunk/contrib/performance/benchmark.py	2010-11-16 20:07:16 UTC (rev 6642)
@@ -356,8 +356,8 @@
     """
     Return a list of PIDs to dtrace.
     """
-    run = source.preauthChild(conf['RunRoot'])
-    return [run.child(conf['PIDFile'])] + [
+    run = source.preauthChild(conf['ServerRoot']).preauthChild(conf['RunRoot'])
+    return [run.child(conf['PIDFile']).getContent()] + [
         pid.getContent() for pid in run.globChildren('*instance*')]
 
 

Modified: CalendarServer/trunk/contrib/performance/sample.sh
===================================================================
--- CalendarServer/trunk/contrib/performance/sample.sh	2010-11-16 19:08:46 UTC (rev 6641)
+++ CalendarServer/trunk/contrib/performance/sample.sh	2010-11-16 20:07:16 UTC (rev 6642)
@@ -5,7 +5,7 @@
 sudo -v # Force up to date sudo token before the user walks away
 
 REV=$1
-LOGS=$2
+SOURCE_DIR=$2
 RESULTS=$3
 
 update_and_build $REV
@@ -18,7 +18,7 @@
   rm -rf data/
   start 2
   popd
-  sudo ./run.sh ./benchmark --label r$REV-$backend --log-directory $LOGS $BENCHMARKS
+  sudo ./run.sh ./benchmark --label r$REV-$backend --source-directory $SOURCE_DIR $BENCHMARKS
   data=`echo -n r$REV-$backend*`
   ./run.sh ./massupload \
       --url $ADDURL --revision $REV \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20101116/530888dd/attachment.html>


More information about the calendarserver-changes mailing list