[CalendarServer-changes] [2417] CalendarServer/trunk/twistedcaldav

source_changes at macosforge.org source_changes at macosforge.org
Wed May 14 11:13:02 PDT 2008


Revision: 2417
          http://trac.macosforge.org/projects/calendarserver/changeset/2417
Author:   dreid at apple.com
Date:     2008-05-14 11:13:01 -0700 (Wed, 14 May 2008)

Log Message:
-----------
Add the ability to profile each of the caldav processes.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/cluster.py
    CalendarServer/trunk/twistedcaldav/config.py

Modified: CalendarServer/trunk/twistedcaldav/cluster.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/cluster.py	2008-05-14 17:59:28 UTC (rev 2416)
+++ CalendarServer/trunk/twistedcaldav/cluster.py	2008-05-14 18:13:01 UTC (rev 2417)
@@ -86,6 +86,12 @@
         if config.GroupName:
             args.extend(('-g', config.GroupName))
 
+        if config.Profiling['Enabled']:
+            args.append('--profile=%s/%s.pstats' % (
+                config.Profiling['BaseDirectory'],
+                self.getName()))
+            args.extend(('--savestats', '--nothotshot'))
+
         args.extend(
             ['-n', self.tapname,
              '-f', self.configFile,

Modified: CalendarServer/trunk/twistedcaldav/config.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/config.py	2008-05-14 17:59:28 UTC (rev 2416)
+++ CalendarServer/trunk/twistedcaldav/config.py	2008-05-14 18:13:01 UTC (rev 2417)
@@ -192,7 +192,13 @@
     "MaxRequests": 600,
 
     # Configure the number of seconds that Propfinds should be cached for.
-    "ResponseCacheSize": 1000
+    "ResponseCacheSize": 1000,
+
+    # Profiling options
+    "Profiling": {
+        "Enabled": False,
+        "BaseDirectory": "/tmp/stats",
+    },
 }
 
 class Config (object):

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080514/6fae04a6/attachment.html


More information about the calendarserver-changes mailing list