[CalendarServer-changes] [8247] CalendarServer/branches/users/glyph/parallel-sim/contrib/performance /loadtest/ampsim.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Nov 1 17:51:59 PDT 2011


Revision: 8247
          http://trac.macosforge.org/projects/calendarserver/changeset/8247
Author:   glyph at apple.com
Date:     2011-11-01 17:51:58 -0700 (Tue, 01 Nov 2011)
Log Message:
-----------
debug prints

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/parallel-sim/contrib/performance/loadtest/ampsim.py

Modified: CalendarServer/branches/users/glyph/parallel-sim/contrib/performance/loadtest/ampsim.py
===================================================================
--- CalendarServer/branches/users/glyph/parallel-sim/contrib/performance/loadtest/ampsim.py	2011-11-02 00:51:44 UTC (rev 8246)
+++ CalendarServer/branches/users/glyph/parallel-sim/contrib/performance/loadtest/ampsim.py	2011-11-02 00:51:58 UTC (rev 8247)
@@ -26,9 +26,11 @@
         import traceback
         try:
             from twisted.python.log import startLogging
-            from sys import stderr, exit
+            from os import getpid
+            from sys import exit#, stderr
 
-            startLogging(stderr)
+            #startLogging(stderr)
+            startLogging(file("ampsim-{0:d}.log".format(getpid()), "wb"))
 
             from twisted.internet import reactor
             from twisted.internet.stdio import StandardIO
@@ -122,7 +124,12 @@
             )
 
 
+    def connectionLost(self, reason):
+        super(Worker, self).connectionLost(reason)
+        msg("Standard IO connection lost.")
 
+
+
 class Manager(AMP):
     """
     Protocol to be run in the coordinating process, to respond to messages from
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20111101/7553ee8c/attachment-0001.html>


More information about the calendarserver-changes mailing list