[CalendarServer-changes] [6175] CalendarServer/trunk/contrib/performance

source_changes at macosforge.org source_changes at macosforge.org
Tue Aug 24 12:13:27 PDT 2010


Revision: 6175
          http://trac.macosforge.org/projects/calendarserver/changeset/6175
Author:   exarkun at twistedmatrix.com
Date:     2010-08-24 12:13:26 -0700 (Tue, 24 Aug 2010)
Log Message:
-----------
Drop CalDAVClientLibrary dependency, since it was just for the URL object

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/benchlib.py
    CalendarServer/trunk/contrib/performance/vfreebusy.py

Modified: CalendarServer/trunk/contrib/performance/benchlib.py
===================================================================
--- CalendarServer/trunk/contrib/performance/benchlib.py	2010-08-24 19:04:31 UTC (rev 6174)
+++ CalendarServer/trunk/contrib/performance/benchlib.py	2010-08-24 19:13:26 UTC (rev 6175)
@@ -4,8 +4,6 @@
 from twisted.internet.defer import inlineCallbacks, returnValue
 from twisted.web.http_headers import Headers
 
-from protocol.url import URL
-
 from stats import Duration
 from httpclient import StringProducer, readBody
 
@@ -19,17 +17,17 @@
         self.principal = principal
 
     def deleteResource(self, url):
-        return self.agent.request('DELETE', 'http://%s%s' % (self.netloc, url.toString()))
+        return self.agent.request('DELETE', 'http://%s%s' % (self.netloc, url))
 
 
     def makeCalendar(self, url):
-        return self.agent.request('MKCALENDAR', 'http://%s%s' % (self.netloc, url.toString()))
+        return self.agent.request('MKCALENDAR', 'http://%s%s' % (self.netloc, url))
 
 
     def writeData(self, url, data, contentType):
         return self.agent.request(
             'PUT', 
-            'http://%s%s' % (self.netloc, url.toString()), 
+            'http://%s%s' % (self.netloc, url), 
             Headers({'content-type': [contentType]}), 
             StringProducer(data))
 
@@ -52,7 +50,7 @@
         "%s:%d" % (host, port),
         user=user, password=password,
         root=root, principal=principal)
-    cal = URL("/calendars/users/%s/%s/" % (user, calendar))
+    cal = "/calendars/users/%s/%s/" % (user, calendar)
     d = _serial([
             (account.deleteResource, (cal,)),
             (account.makeCalendar, (cal,))])

Modified: CalendarServer/trunk/contrib/performance/vfreebusy.py
===================================================================
--- CalendarServer/trunk/contrib/performance/vfreebusy.py	2010-08-24 19:04:31 UTC (rev 6174)
+++ CalendarServer/trunk/contrib/performance/vfreebusy.py	2010-08-24 19:13:26 UTC (rev 6175)
@@ -6,8 +6,6 @@
 from uuid import uuid4
 from datetime import datetime, timedelta
 
-from protocol.url import URL
-
 from twisted.internet.defer import inlineCallbacks, returnValue
 from twisted.internet import reactor
 from twisted.web.client import Agent
@@ -117,7 +115,7 @@
 
     base = "/calendars/users/%s/%s/foo-%%d.ics" % (user, calendar)
     for i, cal in enumerate(makeEvents(events)):
-        yield account.writeData(URL(base % (i,)), cal, "text/calendar")
+        yield account.writeData(base % (i,), cal, "text/calendar")
 
     method = 'POST'
     uri = 'http://%s:%d/calendars/__uids__/%s/outbox/' % (host, port, user)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100824/f1971f99/attachment-0001.html>


More information about the calendarserver-changes mailing list