|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.DataViews.PyProfileDialog</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.DataViews.PyProfileDialog</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing a dialog to display profile data. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <h3>Classes</h3> |
|
34 |
|
35 <table> |
|
36 |
|
37 <tr> |
|
38 <td><a href="#ProfileTreeWidgetItem">ProfileTreeWidgetItem</a></td> |
|
39 <td>Class implementing a custom QTreeWidgetItem to allow sorting on numeric values.</td> |
|
40 </tr> |
|
41 <tr> |
|
42 <td><a href="#PyProfileDialog">PyProfileDialog</a></td> |
|
43 <td>Class implementing a dialog to display the results of a profiling run.</td> |
|
44 </tr> |
|
45 </table> |
|
46 <h3>Functions</h3> |
|
47 |
|
48 <table> |
|
49 <tr><td>None</td></tr> |
|
50 </table> |
|
51 <hr /> |
|
52 <hr /> |
|
53 <a NAME="ProfileTreeWidgetItem" ID="ProfileTreeWidgetItem"></a> |
|
54 <h2>ProfileTreeWidgetItem</h2> |
|
55 |
|
56 <p> |
|
57 Class implementing a custom QTreeWidgetItem to allow sorting on numeric |
|
58 values. |
|
59 </p> |
|
60 <h3>Derived from</h3> |
|
61 QTreeWidgetItem |
|
62 <h3>Class Attributes</h3> |
|
63 |
|
64 <table> |
|
65 <tr><td>None</td></tr> |
|
66 </table> |
|
67 <h3>Class Methods</h3> |
|
68 |
|
69 <table> |
|
70 <tr><td>None</td></tr> |
|
71 </table> |
|
72 <h3>Methods</h3> |
|
73 |
|
74 <table> |
|
75 |
|
76 <tr> |
|
77 <td><a href="#ProfileTreeWidgetItem.__getNC">__getNC</a></td> |
|
78 <td>Private method to get the value to compare on for the first column.</td> |
|
79 </tr> |
|
80 <tr> |
|
81 <td><a href="#ProfileTreeWidgetItem.__lt__">__lt__</a></td> |
|
82 <td>Special method to check, if the item is less than the other one.</td> |
|
83 </tr> |
|
84 </table> |
|
85 <h3>Static Methods</h3> |
|
86 |
|
87 <table> |
|
88 <tr><td>None</td></tr> |
|
89 </table> |
|
90 |
|
91 <a NAME="ProfileTreeWidgetItem.__getNC" ID="ProfileTreeWidgetItem.__getNC"></a> |
|
92 <h4>ProfileTreeWidgetItem.__getNC</h4> |
|
93 <b>__getNC</b>(<i>itm</i>) |
|
94 |
|
95 <p> |
|
96 Private method to get the value to compare on for the first column. |
|
97 </p> |
|
98 <dl> |
|
99 |
|
100 <dt><i>itm</i></dt> |
|
101 <dd> |
|
102 item to operate on (ProfileTreeWidgetItem) |
|
103 </dd> |
|
104 </dl> |
|
105 <dl> |
|
106 <dt>Return:</dt> |
|
107 <dd> |
|
108 comparison value for the first column (integer) |
|
109 </dd> |
|
110 </dl> |
|
111 <a NAME="ProfileTreeWidgetItem.__lt__" ID="ProfileTreeWidgetItem.__lt__"></a> |
|
112 <h4>ProfileTreeWidgetItem.__lt__</h4> |
|
113 <b>__lt__</b>(<i>other</i>) |
|
114 |
|
115 <p> |
|
116 Special method to check, if the item is less than the other one. |
|
117 </p> |
|
118 <dl> |
|
119 |
|
120 <dt><i>other</i></dt> |
|
121 <dd> |
|
122 reference to item to compare against |
|
123 (ProfileTreeWidgetItem) |
|
124 </dd> |
|
125 </dl> |
|
126 <dl> |
|
127 <dt>Return:</dt> |
|
128 <dd> |
|
129 true, if this item is less than other (boolean) |
|
130 </dd> |
|
131 </dl> |
|
132 <div align="right"><a href="#top">Up</a></div> |
|
133 <hr /> |
|
134 <hr /> |
|
135 <a NAME="PyProfileDialog" ID="PyProfileDialog"></a> |
|
136 <h2>PyProfileDialog</h2> |
|
137 |
|
138 <p> |
|
139 Class implementing a dialog to display the results of a profiling run. |
|
140 </p> |
|
141 <h3>Derived from</h3> |
|
142 QDialog, Ui_PyProfileDialog |
|
143 <h3>Class Attributes</h3> |
|
144 |
|
145 <table> |
|
146 <tr><td>None</td></tr> |
|
147 </table> |
|
148 <h3>Class Methods</h3> |
|
149 |
|
150 <table> |
|
151 <tr><td>None</td></tr> |
|
152 </table> |
|
153 <h3>Methods</h3> |
|
154 |
|
155 <table> |
|
156 |
|
157 <tr> |
|
158 <td><a href="#PyProfileDialog.__init__">PyProfileDialog</a></td> |
|
159 <td>Constructor</td> |
|
160 </tr> |
|
161 <tr> |
|
162 <td><a href="#PyProfileDialog.__createResultItem">__createResultItem</a></td> |
|
163 <td>Private method to create an entry in the result list.</td> |
|
164 </tr> |
|
165 <tr> |
|
166 <td><a href="#PyProfileDialog.__createSummaryItem">__createSummaryItem</a></td> |
|
167 <td>Private method to create an entry in the summary list.</td> |
|
168 </tr> |
|
169 <tr> |
|
170 <td><a href="#PyProfileDialog.__eraseAll">__eraseAll</a></td> |
|
171 <td>Private slot to handle the Erase All context menu action.</td> |
|
172 </tr> |
|
173 <tr> |
|
174 <td><a href="#PyProfileDialog.__eraseProfile">__eraseProfile</a></td> |
|
175 <td>Private slot to handle the Erase Profile context menu action.</td> |
|
176 </tr> |
|
177 <tr> |
|
178 <td><a href="#PyProfileDialog.__eraseTiming">__eraseTiming</a></td> |
|
179 <td>Private slot to handle the Erase Timing context menu action.</td> |
|
180 </tr> |
|
181 <tr> |
|
182 <td><a href="#PyProfileDialog.__filter">__filter</a></td> |
|
183 <td>Private slot to handle the Exclude/Include Python Library context menu action.</td> |
|
184 </tr> |
|
185 <tr> |
|
186 <td><a href="#PyProfileDialog.__finish">__finish</a></td> |
|
187 <td>Private slot called when the action finished or the user pressed the button.</td> |
|
188 </tr> |
|
189 <tr> |
|
190 <td><a href="#PyProfileDialog.__populateLists">__populateLists</a></td> |
|
191 <td>Private method used to populate the listviews.</td> |
|
192 </tr> |
|
193 <tr> |
|
194 <td><a href="#PyProfileDialog.__resortResultList">__resortResultList</a></td> |
|
195 <td>Private method to resort the tree.</td> |
|
196 </tr> |
|
197 <tr> |
|
198 <td><a href="#PyProfileDialog.__showContextMenu">__showContextMenu</a></td> |
|
199 <td>Private slot to show the context menu of the listview.</td> |
|
200 </tr> |
|
201 <tr> |
|
202 <td><a href="#PyProfileDialog.__unfinish">__unfinish</a></td> |
|
203 <td>Private slot called to revert the effects of the __finish slot.</td> |
|
204 </tr> |
|
205 <tr> |
|
206 <td><a href="#PyProfileDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
207 <td>Private slot called by a button of the button box clicked.</td> |
|
208 </tr> |
|
209 <tr> |
|
210 <td><a href="#PyProfileDialog.start">start</a></td> |
|
211 <td>Public slot to start the calculation of the profile data.</td> |
|
212 </tr> |
|
213 </table> |
|
214 <h3>Static Methods</h3> |
|
215 |
|
216 <table> |
|
217 <tr><td>None</td></tr> |
|
218 </table> |
|
219 |
|
220 <a NAME="PyProfileDialog.__init__" ID="PyProfileDialog.__init__"></a> |
|
221 <h4>PyProfileDialog (Constructor)</h4> |
|
222 <b>PyProfileDialog</b>(<i>parent=None</i>) |
|
223 |
|
224 <p> |
|
225 Constructor |
|
226 </p> |
|
227 <dl> |
|
228 |
|
229 <dt><i>parent</i></dt> |
|
230 <dd> |
|
231 parent widget (QWidget) |
|
232 </dd> |
|
233 </dl> |
|
234 <a NAME="PyProfileDialog.__createResultItem" ID="PyProfileDialog.__createResultItem"></a> |
|
235 <h4>PyProfileDialog.__createResultItem</h4> |
|
236 <b>__createResultItem</b>(<i>calls, totalTime, totalTimePerCall, cumulativeTime, cumulativeTimePerCall, file, line, functionName</i>) |
|
237 |
|
238 <p> |
|
239 Private method to create an entry in the result list. |
|
240 </p> |
|
241 <dl> |
|
242 |
|
243 <dt><i>calls</i></dt> |
|
244 <dd> |
|
245 number of calls (integer) |
|
246 </dd> |
|
247 <dt><i>totalTime</i></dt> |
|
248 <dd> |
|
249 total time (double) |
|
250 </dd> |
|
251 <dt><i>totalTimePerCall</i></dt> |
|
252 <dd> |
|
253 total time per call (double) |
|
254 </dd> |
|
255 <dt><i>cumulativeTime</i></dt> |
|
256 <dd> |
|
257 cumulative time (double) |
|
258 </dd> |
|
259 <dt><i>cumulativeTimePerCall</i></dt> |
|
260 <dd> |
|
261 cumulative time per call (double) |
|
262 </dd> |
|
263 <dt><i>file</i></dt> |
|
264 <dd> |
|
265 filename of file (string) |
|
266 </dd> |
|
267 <dt><i>line</i></dt> |
|
268 <dd> |
|
269 linenumber (integer) |
|
270 </dd> |
|
271 <dt><i>functionName</i></dt> |
|
272 <dd> |
|
273 function name (string) |
|
274 </dd> |
|
275 </dl> |
|
276 <a NAME="PyProfileDialog.__createSummaryItem" ID="PyProfileDialog.__createSummaryItem"></a> |
|
277 <h4>PyProfileDialog.__createSummaryItem</h4> |
|
278 <b>__createSummaryItem</b>(<i>label, contents</i>) |
|
279 |
|
280 <p> |
|
281 Private method to create an entry in the summary list. |
|
282 </p> |
|
283 <dl> |
|
284 |
|
285 <dt><i>label</i></dt> |
|
286 <dd> |
|
287 text of the first column (string) |
|
288 </dd> |
|
289 <dt><i>contents</i></dt> |
|
290 <dd> |
|
291 text of the second column (string) |
|
292 </dd> |
|
293 </dl> |
|
294 <a NAME="PyProfileDialog.__eraseAll" ID="PyProfileDialog.__eraseAll"></a> |
|
295 <h4>PyProfileDialog.__eraseAll</h4> |
|
296 <b>__eraseAll</b>(<i></i>) |
|
297 |
|
298 <p> |
|
299 Private slot to handle the Erase All context menu action. |
|
300 </p> |
|
301 <a NAME="PyProfileDialog.__eraseProfile" ID="PyProfileDialog.__eraseProfile"></a> |
|
302 <h4>PyProfileDialog.__eraseProfile</h4> |
|
303 <b>__eraseProfile</b>(<i></i>) |
|
304 |
|
305 <p> |
|
306 Private slot to handle the Erase Profile context menu action. |
|
307 </p> |
|
308 <a NAME="PyProfileDialog.__eraseTiming" ID="PyProfileDialog.__eraseTiming"></a> |
|
309 <h4>PyProfileDialog.__eraseTiming</h4> |
|
310 <b>__eraseTiming</b>(<i></i>) |
|
311 |
|
312 <p> |
|
313 Private slot to handle the Erase Timing context menu action. |
|
314 </p> |
|
315 <a NAME="PyProfileDialog.__filter" ID="PyProfileDialog.__filter"></a> |
|
316 <h4>PyProfileDialog.__filter</h4> |
|
317 <b>__filter</b>(<i></i>) |
|
318 |
|
319 <p> |
|
320 Private slot to handle the Exclude/Include Python Library context menu |
|
321 action. |
|
322 </p> |
|
323 <a NAME="PyProfileDialog.__finish" ID="PyProfileDialog.__finish"></a> |
|
324 <h4>PyProfileDialog.__finish</h4> |
|
325 <b>__finish</b>(<i></i>) |
|
326 |
|
327 <p> |
|
328 Private slot called when the action finished or the user pressed the |
|
329 button. |
|
330 </p> |
|
331 <a NAME="PyProfileDialog.__populateLists" ID="PyProfileDialog.__populateLists"></a> |
|
332 <h4>PyProfileDialog.__populateLists</h4> |
|
333 <b>__populateLists</b>(<i>exclude=False</i>) |
|
334 |
|
335 <p> |
|
336 Private method used to populate the listviews. |
|
337 </p> |
|
338 <dl> |
|
339 |
|
340 <dt><i>exclude</i></dt> |
|
341 <dd> |
|
342 flag indicating whether files residing in the |
|
343 Python library should be excluded |
|
344 </dd> |
|
345 </dl> |
|
346 <a NAME="PyProfileDialog.__resortResultList" ID="PyProfileDialog.__resortResultList"></a> |
|
347 <h4>PyProfileDialog.__resortResultList</h4> |
|
348 <b>__resortResultList</b>(<i></i>) |
|
349 |
|
350 <p> |
|
351 Private method to resort the tree. |
|
352 </p> |
|
353 <a NAME="PyProfileDialog.__showContextMenu" ID="PyProfileDialog.__showContextMenu"></a> |
|
354 <h4>PyProfileDialog.__showContextMenu</h4> |
|
355 <b>__showContextMenu</b>(<i>coord</i>) |
|
356 |
|
357 <p> |
|
358 Private slot to show the context menu of the listview. |
|
359 </p> |
|
360 <dl> |
|
361 |
|
362 <dt><i>coord</i></dt> |
|
363 <dd> |
|
364 the position of the mouse pointer (QPoint) |
|
365 </dd> |
|
366 </dl> |
|
367 <a NAME="PyProfileDialog.__unfinish" ID="PyProfileDialog.__unfinish"></a> |
|
368 <h4>PyProfileDialog.__unfinish</h4> |
|
369 <b>__unfinish</b>(<i></i>) |
|
370 |
|
371 <p> |
|
372 Private slot called to revert the effects of the __finish slot. |
|
373 </p> |
|
374 <a NAME="PyProfileDialog.on_buttonBox_clicked" ID="PyProfileDialog.on_buttonBox_clicked"></a> |
|
375 <h4>PyProfileDialog.on_buttonBox_clicked</h4> |
|
376 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
377 |
|
378 <p> |
|
379 Private slot called by a button of the button box clicked. |
|
380 </p> |
|
381 <dl> |
|
382 |
|
383 <dt><i>button</i></dt> |
|
384 <dd> |
|
385 button that was clicked (QAbstractButton) |
|
386 </dd> |
|
387 </dl> |
|
388 <a NAME="PyProfileDialog.start" ID="PyProfileDialog.start"></a> |
|
389 <h4>PyProfileDialog.start</h4> |
|
390 <b>start</b>(<i>pfn, fn=None</i>) |
|
391 |
|
392 <p> |
|
393 Public slot to start the calculation of the profile data. |
|
394 </p> |
|
395 <dl> |
|
396 |
|
397 <dt><i>pfn</i></dt> |
|
398 <dd> |
|
399 basename of the profiling file (string) |
|
400 </dd> |
|
401 <dt><i>fn</i></dt> |
|
402 <dd> |
|
403 file to display the profiling data for (string) |
|
404 </dd> |
|
405 </dl> |
|
406 <div align="right"><a href="#top">Up</a></div> |
|
407 <hr /> |
|
408 </body></html> |