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)))
dataset/ETHPy150Open skyostil/tracy/src/analyzer/plugins/core/CorePlugin.py/CoreInteractivePlugin.showCallHistogram/original