示例#1
0
  def createCallHistogramTable(self):
    t = Report.Table(["Call", "# of Calls"])
    
    hist = TraceOperations.calculateCallHistogram(self.trace)
    values = [(count, name) for name, count in hist.items()]
    for i, value in enumerate(sorted(values, reverse = True)):
       count, name = value
       t.addRow(name, count)

    return t
示例#2
0
    def createCallHistogramTable(self):
        t = Report.Table(["Call", "# of Calls"])

        hist = TraceOperations.calculateCallHistogram(self.trace)
        values = [(count, name) for name, count in hist.items()]
        for i, value in enumerate(sorted(values, reverse=True)):
            count, name = value
            t.addRow(name, count)

        return t
示例#3
0
文件: bitgdi.py 项目: se210/tracy
def histogram(trace):
    s = StringIO.StringIO()
    print >> s, "Call histogram:"
    hist = TraceOperations.calculateCallHistogram(trace)
    values = [(count, name) for name, count in hist.items()]

    for i, value in enumerate(sorted(values, reverse=True)):
        count, name = value
        print >> s, "%4d. %8d - %s" % (i + 1, count, name)
    print >> s
    return s.getvalue()
示例#4
0
文件: bitgdi.py 项目: se210/tracy
def histogram(trace):
  s = StringIO.StringIO()
  print >>s, "Call histogram:"  
  hist = TraceOperations.calculateCallHistogram(trace)
  values  = [(count, name) for name, count in hist.items()]

  for i, value in enumerate(sorted(values, reverse = True)):
    count, name = value
    print >>s, "%4d. %8d - %s" % (i + 1, count, name)
  print >>s
  return s.getvalue()
示例#5
0
文件: CorePlugin.py 项目: se210/tracy
  def showCallHistogram(self, traceName):
    """
    Show the function call frequency histogram for a trace.
    
    @param traceName:   Name of the trace to examine
    """
    if not traceName in self.analyzer.traces:
      self.analyzer.fail("Trace not found: %s" % traceName)

    trace = self.analyzer.traces[traceName]
    hist  = TraceOperations.calculateCallHistogram(trace)

    width   = 40
    largest = max(hist.values())
    values  = [(count, name) for name, count in hist.items()]
    
    for i, value in enumerate(sorted(values, reverse = True)):
      count, name = value
      self.reportInfo("%3d. %-25s %5d %s" % (i + 1, name, count, "#" * int(width * float(count) / largest)))
示例#6
0
文件: CorePlugin.py 项目: se210/tracy
    def showCallHistogram(self, traceName):
        """
    Show the function call frequency histogram for a trace.
    
    @param traceName:   Name of the trace to examine
    """
        if not traceName in self.analyzer.traces:
            self.analyzer.fail("Trace not found: %s" % traceName)

        trace = self.analyzer.traces[traceName]
        hist = TraceOperations.calculateCallHistogram(trace)

        width = 40
        largest = max(hist.values())
        values = [(count, name) for name, count in hist.items()]

        for i, value in enumerate(sorted(values, reverse=True)):
            count, name = value
            self.reportInfo("%3d. %-25s %5d %s" %
                            (i + 1, name, count,
                             "#" * int(width * float(count) / largest)))