[CalendarServer-changes] [15366] CalendarServer/trunk/contrib/performance/simanalysis/sim_regress.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Dec 4 09:03:23 PST 2015


Revision: 15366
          http://trac.calendarserver.org//changeset/15366
Author:   cdaboo at apple.com
Date:     2015-12-04 09:03:23 -0800 (Fri, 04 Dec 2015)
Log Message:
-----------
Wait for actual server child processes to start before running the sim.

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/simanalysis/sim_regress.py

Modified: CalendarServer/trunk/contrib/performance/simanalysis/sim_regress.py
===================================================================
--- CalendarServer/trunk/contrib/performance/simanalysis/sim_regress.py	2015-12-04 17:02:55 UTC (rev 15365)
+++ CalendarServer/trunk/contrib/performance/simanalysis/sim_regress.py	2015-12-04 17:03:23 UTC (rev 15366)
@@ -156,9 +156,15 @@
         if os.path.exists("data"):
             shutil.rmtree("data")
         subprocess.call("./bin/run -nd".split(), stdout=self.log, stderr=self.log)
-        time.sleep(10)
 
+        # Wait for first child pid to appear then wait another 10 seconds
+        t = time.time()
+        while time.time() - t < 60:
+            if os.path.exists("data/Logs/state/caldav-instance-0.pid"):
+                time.sleep(10)
+                break
 
+
     def stopServer(self):
         print("Stopping revision: {}".format(self.currentRev))
         subprocess.call("./bin/run -k".split(), stdout=self.log, stderr=self.log)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20151204/05cf73b5/attachment.html>


More information about the calendarserver-changes mailing list