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

source_changes at macosforge.org source_changes at macosforge.org
Tue Aug 31 08:58:09 PDT 2010


Revision: 6212
          http://trac.macosforge.org/projects/calendarserver/changeset/6212
Author:   exarkun at twistedmatrix.com
Date:     2010-08-31 08:58:08 -0700 (Tue, 31 Aug 2010)
Log Message:
-----------
Try to wait an appropriate amount of time after issuing the "run" command before starting the benchmark

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-31 15:56:12 UTC (rev 6211)
+++ CalendarServer/trunk/contrib/performance/benchmark.py	2010-08-31 15:58:08 UTC (rev 6212)
@@ -200,7 +200,6 @@
             "-p", str(pid),
             # load this script
             "-s", self._dScript]
-        print command
         process = reactor.spawnProcess(proto, command[0], command)
         def eintr(reason):
             reason.trap(DTraceBug)

Modified: CalendarServer/trunk/contrib/performance/sample.sh
===================================================================
--- CalendarServer/trunk/contrib/performance/sample.sh	2010-08-31 15:56:12 UTC (rev 6211)
+++ CalendarServer/trunk/contrib/performance/sample.sh	2010-08-31 15:58:08 UTC (rev 6212)
@@ -1,10 +1,14 @@
-#!/bin/bash -x
+#!/bin/bash
 
-set -e
+set -e # Break on error
+shopt -s nullglob # Expand foo* to nothing if nothing matches
 
+sudo -v # Force up to date sudo token before the user walks away
+
 BACKENDS="filesystem postgresql"
 
 SOURCE=~/Projects/CalendarServer/trunk
+NUM_INSTANCES=2
 BENCHMARKS="vfreebusy event"
 STATISTICS=("urlopen time" execute)
 ADDURL=http://localhost:8000/result/add/
@@ -35,8 +39,15 @@
   stop
   rm -rf data/
   ./run -d -n
-  sleep 2
-  echo "instance pid files" $SOURCE/data/Logs/*instance*
+  while :; do
+    instances=($SOURCE/data/Logs/*instance*)
+    if [ "${#instances[*]}" -ne "$NUM_INSTANCES" ]; then
+      sleep 2
+    else
+      break
+    fi
+  done
+  echo "instance pid files: $instances" 
   popd
   sudo PYTHONPATH=$PYTHONPATH ./benchmark --label r$REV-$backend --log-directory $LOGS $BENCHMARKS
   data=`echo -n r$REV-$backend*`
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100831/ef3e6716/attachment-0001.html>


More information about the calendarserver-changes mailing list