Beispiel #1
0
 def __formatCallers(self, callers):
     """ Format the list of callers into a string with one line
         per caller""" 
     escFunc = self.__escapeFunc()
     
     callerStr = "".join(["(%2.2lf) %s\n" % 
                             (caller.getOverallPercentage(),
                              escFunc(cppName.smartShorten(caller.getFunctionName(), 100))) for caller in callers],
                              )
     return self.__applyFormattingToTemplate(callerStr)
Beispiel #2
0
 def setupControls(self):
     import cppName
     sortedVals = sorted(self.report.getAllRecords().values(),
                          key = lambda rec: rec.getRoot().getElapsedIncl(),
                          reverse = True)
     self.selectedAddr = sortedVals[0].getRoot().getFunctionAddr()
     self.selectedDepth = MainWindow.__initDepth
     rootFuncs = [(rec.getRoot().getFunctionAddr(),
                   cppName.smartShorten(rec.getRoot().getFunctionName(), 100))
                   for rec in sortedVals]
         
     self.navigateWidget = ExploreControls(parent=self, funcs=rootFuncs, initDepth = MainWindow.__initDepth)
     self.mainLayout.addWidget(self.navigateWidget)
     self.navigateWidget.newRootFunctionSelected.connect(self.drawWithNewItem)
     self.navigateWidget.depthChanged.connect(self.drawWithNewDepth)
     self.navigateWidget.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
 def getName(self):
     myEntry = self.__myEntry()
     shortened = cppName.smartShorten(myEntry.getFunctionName(), 100)
     return shortened