[CalendarServer-changes] [7554] CalendarServer/trunk/contrib/performance/loadtest/profiles.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Jun 3 13:27:30 PDT 2011


Revision: 7554
          http://trac.macosforge.org/projects/calendarserver/changeset/7554
Author:   exarkun at twistedmatrix.com
Date:     2011-06-03 13:27:30 -0700 (Fri, 03 Jun 2011)
Log Message:
-----------
If an out-of-bounds user is randomly selected, proceed to the next random user.

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/loadtest/profiles.py

Modified: CalendarServer/trunk/contrib/performance/loadtest/profiles.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/profiles.py	2011-06-03 19:57:35 UTC (rev 7553)
+++ CalendarServer/trunk/contrib/performance/loadtest/profiles.py	2011-06-03 20:27:30 UTC (rev 7554)
@@ -154,7 +154,10 @@
         for i in range(10):
             invitee = max(
                 1, self._number + self._inviteeDistanceDistribution.sample())
-            record = self._sim.getUserRecord(invitee)
+            try:
+                record = self._sim.getUserRecord(invitee)
+            except IndexError:
+                continue
             uuid = u'urn:uuid:%s' % (record.uid,)
             if uuid not in invitees:
                 break
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110603/e4a4477d/attachment.html>


More information about the calendarserver-changes mailing list