# eric7.DataViews.PyProfileDialog

Module implementing a dialog to display profile data.

### Global Attributes

None

### Classes

ProfileTreeWidgetItem | Class implementing a custom QTreeWidgetItem to allow sorting on numeric values.
PyProfileDialog | Class implementing a dialog to display the results of a profiling run.

### Functions

None

## ProfileTreeWidgetItem

Class implementing a custom QTreeWidgetItem to allow sorting on numeric values.

### Derived from

QTreeWidgetItem

### Class Attributes

None

### Class Methods

None

### Methods

__getNC | Private method to get the value to compare on for the first column.
__lt__ | Special method to check, if the item is less than the other one.

### Static Methods

None

#### ProfileTreeWidgetItem.__getNC

__getNC(itm)

Private method to get the value to compare on for the first column.

itm
  item to operate on (ProfileTreeWidgetItem)

Return:
  comparison value for the first column (integer)

#### ProfileTreeWidgetItem.__lt__

__lt__(other)

Special method to check, if the item is less than the other one.

other
  reference to item to compare against (ProfileTreeWidgetItem)

Return:
  true, if this item is less than other (boolean)

Up

## PyProfileDialog

Class implementing a dialog to display the results of a profiling run.

### Derived from

QDialog, Ui_PyProfileDialog

### Class Attributes

None

### Class Methods

None

### Methods

PyProfileDialog | Constructor
__createResultItem | Private method to create an entry in the result list.
__createSummaryItem | Private method to create an entry in the summary list.
__eraseAll | Private slot to handle the Erase All context menu action.
__eraseProfile | Private slot to handle the Erase Profile context menu action.
__eraseTiming | Private slot to handle the Erase Timing context menu action.
__filter | Private slot to handle the Exclude/Include Python Library context menu action.
__finish | Private slot called when the action finished or the user pressed the button.
__populateLists | Private method used to populate the listviews.
__resortResultList | Private method to resort the tree.
__showContextMenu | Private slot to show the context menu of the listview.
__unfinish | Private slot called to revert the effects of the __finish slot.
on_buttonBox_clicked | Private slot called by a button of the button box clicked.
start | Public slot to start the calculation of the profile data.

### Static Methods

None

#### PyProfileDialog (Constructor)

PyProfileDialog(parent=None)

Constructor

parent
  parent widget (QWidget)

#### PyProfileDialog.__createResultItem

__createResultItem(calls, totalTime, totalTimePerCall, cumulativeTime, cumulativeTimePerCall, file, line, functionName)

Private method to create an entry in the result list.

calls
  number of calls (integer)
totalTime
  total time (double)
totalTimePerCall
  total time per call (double)
cumulativeTime
  cumulative time (double)
cumulativeTimePerCall
  cumulative time per call (double)
file
  filename of file (string)
line
  linenumber (integer)
functionName
  function name (string)

#### PyProfileDialog.__createSummaryItem

__createSummaryItem(label, contents)

Private method to create an entry in the summary list.

label
  text of the first column (string)
contents
  text of the second column (string)

#### PyProfileDialog.__eraseAll

__eraseAll()

Private slot to handle the Erase All context menu action.

#### PyProfileDialog.__eraseProfile

__eraseProfile()

Private slot to handle the Erase Profile context menu action.

#### PyProfileDialog.__eraseTiming

__eraseTiming()

Private slot to handle the Erase Timing context menu action.

#### PyProfileDialog.__filter

__filter()

Private slot to handle the Exclude/Include Python Library context menu action.

#### PyProfileDialog.__finish

__finish()

Private slot called when the action finished or the user pressed the button.

#### PyProfileDialog.__populateLists

__populateLists(exclude=False)

Private method used to populate the listviews.

exclude
  flag indicating whether files residing in the Python library should be excluded

#### PyProfileDialog.__resortResultList

__resortResultList()

Private method to resort the tree.

#### PyProfileDialog.__showContextMenu

__showContextMenu(coord)

Private slot to show the context menu of the listview.

coord
  the position of the mouse pointer (QPoint)

#### PyProfileDialog.__unfinish

__unfinish()

Private slot called to revert the effects of the __finish slot.

#### PyProfileDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot called by a button of the button box clicked.

button
  button that was clicked (QAbstractButton)

#### PyProfileDialog.start

start(pfn, fn=None)

Public slot to start the calculation of the profile data.

pfn
  basename of the profiling file (string)
fn
  file to display the profiling data for (string)

Up