[CalendarServer-changes] [11832] CalendarServer/branches/users/cdaboo/performance-tweaks/contrib/ performance/loadtest

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 12 11:18:42 PDT 2014


Revision: 11832
          http://trac.calendarserver.org//changeset/11832
Author:   cdaboo at apple.com
Date:     2013-10-22 17:24:49 -0700 (Tue, 22 Oct 2013)
Log Message:
-----------
Serialized data is always required. Change the option to allow enabling/disabling of whether the cached data is re-used.

Modified Paths:
--------------
    CalendarServer/branches/users/cdaboo/performance-tweaks/contrib/performance/loadtest/config.dist.plist
    CalendarServer/branches/users/cdaboo/performance-tweaks/contrib/performance/loadtest/config.plist
    CalendarServer/branches/users/cdaboo/performance-tweaks/contrib/performance/loadtest/sim.py

Modified: CalendarServer/branches/users/cdaboo/performance-tweaks/contrib/performance/loadtest/config.dist.plist
===================================================================
--- CalendarServer/branches/users/cdaboo/performance-tweaks/contrib/performance/loadtest/config.dist.plist	2013-10-22 02:21:03 UTC (rev 11831)
+++ CalendarServer/branches/users/cdaboo/performance-tweaks/contrib/performance/loadtest/config.dist.plist	2013-10-23 00:24:49 UTC (rev 11832)
@@ -59,10 +59,10 @@
 			<integer>8100</integer>
 		</dict>
 
-		<!--  Define whether client data should be saved and re-used. -->
+		<!--  Define whether client data should be re-used. It will always be saved to the specified path.-->
 		<key>clientDataSerialization</key>
 		<dict>
-			<key>Enabled</key>
+			<key>UseOldData</key>
 			<true/>
 			<key>Path</key>
 			<string>/tmp/sim</string>

Modified: CalendarServer/branches/users/cdaboo/performance-tweaks/contrib/performance/loadtest/config.plist
===================================================================
--- CalendarServer/branches/users/cdaboo/performance-tweaks/contrib/performance/loadtest/config.plist	2013-10-22 02:21:03 UTC (rev 11831)
+++ CalendarServer/branches/users/cdaboo/performance-tweaks/contrib/performance/loadtest/config.plist	2013-10-23 00:24:49 UTC (rev 11832)
@@ -46,10 +46,10 @@
 			<integer>8100</integer>
 		</dict>
 
-		<!--  Define whether client data should be saved and re-used. -->
+		<!--  Define whether client data should be re-used. It will always be saved to the specified path.-->
 		<key>clientDataSerialization</key>
 		<dict>
-			<key>Enabled</key>
+			<key>UseOldData</key>
 			<true/>
 			<key>Path</key>
 			<string>/tmp/sim</string>

Modified: CalendarServer/branches/users/cdaboo/performance-tweaks/contrib/performance/loadtest/sim.py
===================================================================
--- CalendarServer/branches/users/cdaboo/performance-tweaks/contrib/performance/loadtest/sim.py	2013-10-22 02:21:03 UTC (rev 11831)
+++ CalendarServer/branches/users/cdaboo/performance-tweaks/contrib/performance/loadtest/sim.py	2013-10-23 00:24:49 UTC (rev 11832)
@@ -26,6 +26,7 @@
 from urlparse import urlsplit
 from xml.parsers.expat import ExpatError
 import json
+import shutil
 import socket
 
 from twisted.python import context
@@ -289,15 +290,17 @@
                 principalPathTemplate = config['principalPathTemplate']
 
             if 'clientDataSerialization' in config:
-                if config['clientDataSerialization']['Enabled']:
-                    serializationPath = config['clientDataSerialization']['Path']
-                    if not isdir(serializationPath):
-                        try:
-                            mkdir(serializationPath)
-                        except OSError:
-                            print("Unable to create client data serialization directory: %s" % (serializationPath))
-                            print("Please consult the clientDataSerialization stanza of contrib/performance/loadtest/config.plist")
-                            raise
+                serializationPath = config['clientDataSerialization']['Path']
+                if not config['clientDataSerialization']['UseOldData']:
+                    shutil.rmtree(serializationPath)
+                serializationPath = config['clientDataSerialization']['Path']
+                if not isdir(serializationPath):
+                    try:
+                        mkdir(serializationPath)
+                    except OSError:
+                        print("Unable to create client data serialization directory: %s" % (serializationPath))
+                        print("Please consult the clientDataSerialization stanza of contrib/performance/loadtest/config.plist")
+                        raise
 
             if 'arrival' in config:
                 arrival = Arrival(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/5575618f/attachment.html>


More information about the calendarserver-changes mailing list