示例#1
0
 def _getDeltaMarker(self, startMarker, stopMarker, index):
     records = _getTimelineRecords()
     # Looking for a line like this:
     #   00010.828 (002548b0):   <startMarker>
     #   00011.828 (002548b0):   <stopMarker>
     # and returns the difference (in this case 1.0)
     counter = ptimeline.count(startMarker, records)
     loglines = [str(r) for r in counter["records"]]
     if not counter["count"]:
         raise PerfError("There were no '%s' markers in the "
                         "timeline:\n\t%s"
                         % (startMarker, '\n\t'.join(loglines)))
     start = counter["records"][index].event_time
     counter = ptimeline.count(stopMarker, records)
     loglines = [str(r) for r in counter["records"]]
     if not counter["count"]:
         raise PerfError("There were no '%s' markers in the "
                         "timeline:\n\t%s"
                         % (stopMarker, '\n\t'.join(loglines)))
     end = counter["records"][index].event_time
     return end-start, '\n'.join(loglines)
示例#2
0
 def _getDeltaMarker(self, startMarker, stopMarker, index):
     records = _getTimelineRecords()
     # Looking for a line like this:
     #   00010.828 (002548b0):   <startMarker>
     #   00011.828 (002548b0):   <stopMarker>
     # and returns the difference (in this case 1.0)
     counter = ptimeline.count(startMarker, records)
     loglines = [str(r) for r in counter["records"]]
     if not counter["count"]:
         raise PerfError("There were no '%s' markers in the "
                         "timeline:\n\t%s" %
                         (startMarker, '\n\t'.join(loglines)))
     start = counter["records"][index].event_time
     counter = ptimeline.count(stopMarker, records)
     loglines = [str(r) for r in counter["records"]]
     if not counter["count"]:
         raise PerfError("There were no '%s' markers in the "
                         "timeline:\n\t%s" %
                         (stopMarker, '\n\t'.join(loglines)))
     end = counter["records"][index].event_time
     return end - start, '\n'.join(loglines)
示例#3
0
 def perf_startup(self):
     """how long does Komodo take to startup"""
     records = _getTimelineRecords()
     # Looking for a line like this:
     #   00010.828 (002548b0):   startup complete
     marker = "startup complete"
     counter = ptimeline.count(marker, records)
     loglines = [str(r) for r in counter["records"]]
     if counter["count"] != 1:
         raise PerfError("There was more than '%s' marker in the "
                         "timeline:\n\t%s"
                         % (marker, '\n\t'.join(loglines)))
     startup_time = counter["records"][0].event_time
     return startup_time, '\n'.join(loglines)
示例#4
0
 def perf_startup(self):
     """how long does Komodo take to startup"""
     records = _getTimelineRecords()
     # Looking for a line like this:
     #   00010.828 (002548b0):   startup complete
     marker = "startup complete"
     counter = ptimeline.count(marker, records)
     loglines = [str(r) for r in counter["records"]]
     if counter["count"] != 1:
         raise PerfError("There was more than '%s' marker in the "
                         "timeline:\n\t%s" %
                         (marker, '\n\t'.join(loglines)))
     startup_time = counter["records"][0].event_time
     return startup_time, '\n'.join(loglines)