[CalendarServer-changes] [9007] CalendarServer/trunk/contrib/tools/request_monitor.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Apr 10 12:14:20 PDT 2012
Revision: 9007
http://trac.macosforge.org/projects/calendarserver/changeset/9007
Author: cdaboo at apple.com
Date: 2012-04-10 12:14:19 -0700 (Tue, 10 Apr 2012)
Log Message:
-----------
Fix OS X cpu issue. Handle empty log files properly. Delay when there is an exception.
Modified Paths:
--------------
CalendarServer/trunk/contrib/tools/request_monitor.py
Modified: CalendarServer/trunk/contrib/tools/request_monitor.py
===================================================================
--- CalendarServer/trunk/contrib/tools/request_monitor.py 2012-04-10 17:43:49 UTC (rev 9006)
+++ CalendarServer/trunk/contrib/tools/request_monitor.py 2012-04-10 19:14:19 UTC (rev 9007)
@@ -161,7 +161,7 @@
stdout=PIPE, stderr=STDOUT,
)
output, _ignore_ = child.communicate()
- return output.splitlines[-2].split()[2]
+ return output.splitlines()[-2].split()[2]
elif OS == "Linux":
child = Popen(
args=[
@@ -455,6 +455,11 @@
times.sort()
+ if len(times) == 0:
+ print "No data to analyze"
+ time.sleep(10)
+ continue
+
startTime = times[0]
endTime = times[-1]
deltaTime = endTime - startTime
@@ -579,9 +584,9 @@
if lineRange is not None:
break
- time.sleep(10)
-
except Exception, e:
print "Script failure", e
if debug:
print traceback.print_exc()
+
+ time.sleep(10)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120410/bb2e64e4/attachment.html>
More information about the calendarserver-changes
mailing list