[CalendarServer-changes] [8251] CalendarServer/branches/users/glyph/parallel-sim/contrib/performance /loadtest/sim.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Nov 1 17:52:59 PDT 2011


Revision: 8251
          http://trac.macosforge.org/projects/calendarserver/changeset/8251
Author:   glyph at apple.com
Date:     2011-11-01 17:52:59 -0700 (Tue, 01 Nov 2011)
Log Message:
-----------
handy utility function that can synthesize a large number of records

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/parallel-sim/contrib/performance/loadtest/sim.py

Modified: CalendarServer/branches/users/glyph/parallel-sim/contrib/performance/loadtest/sim.py
===================================================================
--- CalendarServer/branches/users/glyph/parallel-sim/contrib/performance/loadtest/sim.py	2011-11-02 00:52:44 UTC (rev 8250)
+++ CalendarServer/branches/users/glyph/parallel-sim/contrib/performance/loadtest/sim.py	2011-11-02 00:52:59 UTC (rev 8251)
@@ -73,6 +73,15 @@
         in pathObj.getContent().splitlines()]
 
 
+
+def recordsFromCount(count, uid=u"user%02d", password=u"user%02d",
+                     commonName=u"User %02d", email=u"user%02d at example.com"):
+    for i in range(1, count + 1):
+        yield _DirectoryRecord(uid % i, password % i,
+                               commonName % i, email % i)
+
+
+
 class LagTrackingReactor(object):
     """
     This reactor wraps another reactor and proxies all attribute
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20111101/ac881f18/attachment-0001.html>


More information about the calendarserver-changes mailing list