Call count statistics can be used to identify bugs in code (surprising counts), and to identify possible inline-expansion points (high call counts). Internal time statistics can be used to identify "hot loops" that should be carefully optimized. Cumulative time statistics should be used to identify high level errors in the selection of algorithms.
![]()
Field with DF behavior i
Button Function Quick analysis The result will be displayed directly in a MessageBox Generate file Save the result as a file Cancel Discard the result
Details
Mode Limitation Normal 25 lines Callers 15 lines Callees 15 lines
Number Explanation 1 Time of the analysis and path of the profile file. During the quick analysis, the file is always located in a temporary directory 2 The number of function calls with recursion, without recursion, and the total duration 3 Subject of sorting and amount of display 4 The profile table 5, 6, 7, 8 Sort by the corresponding column 9 Switch between the Normal, Callers and Callees views 10 Cancel display and close the MessageBox
Column Explanation ncalls The number of calls and the number without recursive calls are separated by a slash tottime Total time that you spent in this function without opening subfunctions percall tottime/ncalls cumtime Time you spent within the function from opening until completion, including all subfunctions percall cumtime/ncalls filename:lineno(function) Name of the file: Line number (function name)
View Meaning Normal Shows function calls with values for the columns specified above Callers Shows, by what a function was opened as well as ncalls, tottime and cumtime Callees Shows, which subfunctions of a function have been opened as well as the same columns as in the Callers view
from ppms import ppms projects = [item for sublist in ppms.db_select("SELECT DI001001 FROM DT461") for item in sublist] for project in projects: project_rec = ppms.search_record(461, [project], [1001], True)
ncalls tottime percall cumtime percall 209 0.573 0.003 0.573 0.003 {built-in method search_record} 11 0.000 0.000 0.000 0.000 ppms_. 2 0.007 0.004 0.007 0.004 {built-in method db_select}
Details
search_record
209 was opened, which took 0.573 seconds.
db_select
was opened twice, which seems strange here since the macro opens db_select
only once.
Function was called by... ncalls tottime cumtime {built-in method search_record} <- 4 0.003 0.003 MACRO_MOD_009ATM.py:1(<module>) 204 0.569 0.569 MACRO_MOD_009BQX.py:1(<module>) 1 0.000 0.000 ppms_cu. {built-in method db_select} <- 1 0.006 0.006 MACRO_MOD_009BQX.py:1(<module>) 1 0.001 0.001 ppms_cu. ppms_cu. <- 1 0.000 0.016 MACRO_MOD_009ATM.py:1(<module>)
Notes
Details
db_select
has actually been opened by the module once only. get_global_setting
aus ppms_cu
method.
I | Attachment | History | Size | Date![]() |
Comment |
---|---|---|---|---|---|
![]() |
ProfileDefaultMsg.png | r1 | 40.9 K | 2012-07-17 - 10:00 | |
![]() |
ProfilerProfileField.PNG | r1 | 7.5 K | 2012-07-17 - 10:00 |