[CalendarServer-changes] [15356] CalendarServer/trunk/bin

source_changes at macosforge.org source_changes at macosforge.org
Wed Dec 2 13:18:58 PST 2015


Revision: 15356
          http://trac.calendarserver.org//changeset/15356
Author:   cdaboo at apple.com
Date:     2015-12-02 13:18:58 -0800 (Wed, 02 Dec 2015)
Log Message:
-----------
Fix scripts.

Modified Paths:
--------------
    CalendarServer/trunk/bin/testpodssim
    CalendarServer/trunk/bin/testsim
    CalendarServer/trunk/bin/testsqlusage

Modified: CalendarServer/trunk/bin/testpodssim
===================================================================
--- CalendarServer/trunk/bin/testpodssim	2015-12-02 20:26:20 UTC (rev 15355)
+++ CalendarServer/trunk/bin/testpodssim	2015-12-02 21:18:58 UTC (rev 15356)
@@ -36,23 +36,26 @@
     config="${wd}/contrib/performance/loadtest/config.plist";
    clients="${wd}/contrib/performance/loadtest/clients.plist";
    runtime="--runtime 300";
+   logfile="";
 
 usage ()
 {
   program="$(basename "$0")";
-  echo "Usage: ${program} [-r RUNTIME]";
+  echo "Usage: ${program} [-r RUNTIME] [-l LOGFILE]";
   echo "Options:";
   echo "        -r  Set the runtime";
+  echo "        -l  Log file";
 
   if [ "${1-}" = "-" ]; then return 0; fi;
   exit 64;
 }
 
-while getopts 'r:' option; do
+while getopts 'hl:r:' option; do
   case "$option" in
     '?') usage; ;;
     'h') usage -; exit 0; ;;
     'r') runtime="--runtime ${OPTARG}"; ;;
+    'l') logfile="--logfile ${OPTARG}"; ;;
   esac;
 done;
 
@@ -151,7 +154,7 @@
 echo ""
 echo "Starting Sim run"
 
-"${python}" "${sim}" --config "${config}" --clients "${clients}" ${runtime}
+"${python}" "${sim}" --config "${config}" --clients "${clients}" ${runtime} "${logfile}"
 
 # Capture exit status of sim.py to use as this script's exit status.
 

Modified: CalendarServer/trunk/bin/testsim
===================================================================
--- CalendarServer/trunk/bin/testsim	2015-12-02 20:26:20 UTC (rev 15355)
+++ CalendarServer/trunk/bin/testsim	2015-12-02 21:18:58 UTC (rev 15356)
@@ -36,23 +36,26 @@
     config="${wd}/contrib/performance/loadtest/config.plist";
    clients="${wd}/contrib/performance/loadtest/clients.plist";
    runtime="--runtime 300";
+   logfile="";
 
 usage ()
 {
   program="$(basename "$0")";
-  echo "Usage: ${program} [-r RUNTIME]";
+  echo "Usage: ${program} [-r RUNTIME] [-l LOGFILE]";
   echo "Options:";
   echo "        -r  Set the runtime";
+  echo "        -l  Log file";
 
   if [ "${1-}" = "-" ]; then return 0; fi;
   exit 64;
 }
 
-while getopts 'r:' option; do
+while getopts 'hl:r:' option; do
   case "$option" in
     '?') usage; ;;
     'h') usage -; exit 0; ;;
     'r') runtime="--runtime ${OPTARG}"; ;;
+    'l') logfile="--logfile ${OPTARG}"; ;;
   esac;
 done;
 
@@ -124,7 +127,7 @@
 
 echo "Starting Sim run"
 
-"${python}" "${sim}" --config "${config}" --clients "${clients}" ${runtime}
+"${python}" "${sim}" --config "${config}" --clients "${clients}" ${runtime} "${logfile}"
 
 # Capture exit status of sim.py to use as this script's exit status.
 

Modified: CalendarServer/trunk/bin/testsqlusage
===================================================================
--- CalendarServer/trunk/bin/testsqlusage	2015-12-02 20:26:20 UTC (rev 15355)
+++ CalendarServer/trunk/bin/testsqlusage	2015-12-02 21:18:58 UTC (rev 15356)
@@ -42,7 +42,7 @@
   exit 64;
 }
 
-while getopts 'r:' option; do
+while getopts 'h' option; do
   case "$option" in
     '?') usage; ;;
     'h') usage -; exit 0; ;;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20151202/d38d9c07/attachment.html>


More information about the calendarserver-changes mailing list