[CalendarServer-changes] [15327] CalendarServer/trunk/contrib/performance/loadtest

source_changes at macosforge.org source_changes at macosforge.org
Tue Nov 17 16:27:31 PST 2015


Revision: 15327
          http://trac.calendarserver.org//changeset/15327
Author:   sagen at apple.com
Date:     2015-11-17 16:27:31 -0800 (Tue, 17 Nov 2015)
Log Message:
-----------
Client sim now can connect to multiple amp servers

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/loadtest/clients.plist
    CalendarServer/trunk/contrib/performance/loadtest/ical.py

Modified: CalendarServer/trunk/contrib/performance/loadtest/clients.plist
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/clients.plist	2015-11-17 16:57:55 UTC (rev 15326)
+++ CalendarServer/trunk/contrib/performance/loadtest/clients.plist	2015-11-18 00:27:31 UTC (rev 15327)
@@ -55,8 +55,10 @@
 
 					<key>supportAmpPush</key>
 					<true/>
-					<key>ampPushHost</key>
-					<string>localhost</string>
+					<key>ampPushHosts</key>
+					<array>
+						<string>localhost</string>
+				    </array>
 					<key>ampPushPort</key>
 					<integer>62311</integer>
 				</dict>

Modified: CalendarServer/trunk/contrib/performance/loadtest/ical.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/ical.py	2015-11-17 16:57:55 UTC (rev 15326)
+++ CalendarServer/trunk/contrib/performance/loadtest/ical.py	2015-11-18 00:27:31 UTC (rev 15327)
@@ -492,7 +492,7 @@
         calendarHomePollInterval=None,
         supportPush=True,
         supportAmpPush=True,
-        ampPushHost=None,
+        ampPushHosts=None,
         ampPushPort=62311,
     ):
 
@@ -523,9 +523,9 @@
         self.supportPush = supportPush
 
         self.supportAmpPush = supportAmpPush
-        if ampPushHost is None:
-            ampPushHost = urlparse(self.root)[1].split(":")[0]
-        self.ampPushHost = ampPushHost
+        if ampPushHosts is None:
+            ampPushHosts = [urlparse(self.root)[1].split(":")[0]]
+        self.ampPushHosts = ampPushHosts
         self.ampPushPort = ampPushPort
 
         self.serializePath = serializePath
@@ -1452,10 +1452,11 @@
         """
         Start monitoring for AMP-based push notifications
         """
-        subscribeToIDs(
-            self.ampPushHost, self.ampPushPort, pushKeys,
-            self._receivedPush, self.reactor
-        )
+        for host in self.ampPushHosts:
+            subscribeToIDs(
+                host, self.ampPushPort, pushKeys,
+                self._receivedPush, self.reactor
+            )
 
 
     @inlineCallbacks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20151117/a4fecf05/attachment.html>


More information about the calendarserver-changes mailing list