[CalendarServer-changes] [6124] CalendarServer/trunk/contrib/performance/benchmark.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Aug 18 17:25:11 PDT 2010


Revision: 6124
          http://trac.macosforge.org/projects/calendarserver/changeset/6124
Author:   exarkun at twistedmatrix.com
Date:     2010-08-18 17:25:10 -0700 (Wed, 18 Aug 2010)
Log Message:
-----------
parameterize the dtrace script

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/benchmark.py

Modified: CalendarServer/trunk/contrib/performance/benchmark.py
===================================================================
--- CalendarServer/trunk/contrib/performance/benchmark.py	2010-08-19 00:24:34 UTC (rev 6123)
+++ CalendarServer/trunk/contrib/performance/benchmark.py	2010-08-19 00:25:10 UTC (rev 6124)
@@ -65,7 +65,8 @@
 
 
 class DTraceCollector(object):
-    def __init__(self, pids):
+    def __init__(self, script, pids):
+        self._dScript = script
         self.pids = pids
         self._read = []
         self._write = []
@@ -160,7 +161,7 @@
              # make this pid the target
              "-p", str(pid),
              # load this script
-             "-s", "io_measure.d"])
+             "-s", self._dScript])
         def eintr(reason):
             reason.trap(DTraceBug)
             print 'Dtrace startup failed (', reason.getErrorMessage().strip(), '), retrying.'
@@ -202,7 +203,7 @@
         statistics[stat] = {}
         for p in parameter:
             print 'Parameter at', p
-            dtrace = DTraceCollector(pids)
+            dtrace = DTraceCollector("io_measure.d", pids)
             data = yield survey(dtrace, p, 100)
             statistics[stat][p] = data
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100818/a63f63ee/attachment.html>


More information about the calendarserver-changes mailing list