[CalendarServer-changes] [7754] CalendarServer/trunk/contrib/performance/loadtest
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jul 11 08:37:35 PDT 2011
Revision: 7754
http://trac.macosforge.org/projects/calendarserver/changeset/7754
Author: exarkun at twistedmatrix.com
Date: 2011-07-11 08:37:34 -0700 (Mon, 11 Jul 2011)
Log Message:
-----------
Make the accounts.csv path relative to the config.plist so the top-level sim script works
Modified Paths:
--------------
CalendarServer/trunk/contrib/performance/loadtest/config.plist
CalendarServer/trunk/contrib/performance/loadtest/sim.py
Modified: CalendarServer/trunk/contrib/performance/loadtest/config.plist
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/config.plist 2011-07-11 13:54:04 UTC (rev 7753)
+++ CalendarServer/trunk/contrib/performance/loadtest/config.plist 2011-07-11 15:37:34 UTC (rev 7754)
@@ -41,8 +41,12 @@
<!-- Keyword arguments may be passed to the loader. -->
<key>params</key>
<dict>
+ <!-- recordsFromCSVFile interprets the path relative to the
+ config.plist, to make it independent of the script's working
+ directory while still allowing a relative path. This isn't
+ a great solution. -->
<key>path</key>
- <string>loadtest/accounts.csv</string>
+ <string>accounts.csv</string>
</dict>
</dict>
Modified: CalendarServer/trunk/contrib/performance/loadtest/sim.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/sim.py 2011-07-11 13:54:04 UTC (rev 7753)
+++ CalendarServer/trunk/contrib/performance/loadtest/sim.py 2011-07-11 15:37:34 UTC (rev 7754)
@@ -43,10 +43,11 @@
def recordsFromCSVFile(path):
+ pathObj = FilePath(__file__).parent().preauthChild(path)
return [
_DirectoryRecord(*line.decode('utf-8').split(u','))
for line
- in FilePath(path).getContent().splitlines()]
+ in pathObj.getContent().splitlines()]
class LagTrackingReactor(object):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110711/1fb2344a/attachment.html>
More information about the calendarserver-changes
mailing list