[CalendarServer-changes] [7050] CalendarServer/trunk/contrib/performance/loadtest/sim.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Feb 18 13:47:04 PST 2011


Revision: 7050
          http://trac.macosforge.org/projects/calendarserver/changeset/7050
Author:   exarkun at twistedmatrix.com
Date:     2011-02-18 13:47:03 -0800 (Fri, 18 Feb 2011)
Log Message:
-----------
Some options to help debugging

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/loadtest/sim.py

Modified: CalendarServer/trunk/contrib/performance/loadtest/sim.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/sim.py	2011-02-18 19:36:06 UTC (rev 7049)
+++ CalendarServer/trunk/contrib/performance/loadtest/sim.py	2011-02-18 21:47:03 UTC (rev 7050)
@@ -51,6 +51,30 @@
                 "--config %s: %s" % (path, str(e)))
 
 
+    def opt_debug(self):
+        """
+        Enable Deferred and Failure debugging.
+        """
+        self.opt_debug_deferred()
+        self.opt_debug_failure()
+
+
+    def opt_debug_deferred(self):
+        """
+        Enable Deferred debugging.
+        """
+        from twisted.internet.defer import setDebugging
+        setDebugging(True)
+
+
+    def opt_debug_failure(self):
+        """
+        Enable Failure debugging.
+        """
+        from twisted.python.failure import startDebugMode
+        startDebugMode()
+
+
     def postOptions(self):
         if self.config is None:
             raise UsageError("Specify a configuration file using --config <path>")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110218/f2b4ec85/attachment.html>


More information about the calendarserver-changes mailing list