Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
|
Public Member Functions | |
def | __init__ |
def | init |
def | load_stats |
def | get_top_level_stats |
def | add |
def | get_sort_arg_defs |
def | sort_stats |
def | reverse_order |
def | strip_dirs |
def | calc_callees |
def | eval_print_amount |
def | get_print_list |
def | print_stats |
def | print_callees |
def | print_callers |
def | print_call_heading |
def | print_call_line |
def | print_title |
def | print_line |
def | ignore |
Data Fields | |
all_callees | |
files | |
fcn_list | |
total_tt | |
total_calls | |
prim_calls | |
max_name_len | |
top_level | |
stats | |
sort_arg_dict | |
sort_type | |
Static Public Attributes | |
dictionary | sort_arg_dict_default |
This class is used for creating reports from data generated by the Profile class. It is a "friend" of that class, and imports data either by direct access to members of Profile class, or by reading in a dictionary that was emitted (via marshal) from the Profile class. The big change from the previous Profiler (in terms of raw functionality) is that an "add()" method has been provided to combine Stats from several distinct profile runs. Both the constructor and the add() method now take arbitrarily many file names as arguments. All the print methods now take an argument that indicates how many lines to print. If the arg is a floating point number between 0 and 1.0, then it is taken as a decimal percentage of the available lines to be printed (e.g., .1 means print 10% of all available lines). If it is an integer, it is taken to mean the number of lines of data that you wish to have printed. The sort_stats() method now processes some additional options (i.e., in addition to the old -1, 0, 1, or 2). It takes an arbitrary number of quoted strings to select the sort order. For example sort_stats('time', 'name') sorts on the major key of "internal function time", and on the minor key of 'the name of the function'. Look at the two tables in sort_stats() and get_sort_arg_defs(self) for more examples. All methods now return "self", so you can string together commands like: Stats('foo', 'goo').strip_dirs().sort_stats('calls').\ print_stats(5).print_callers(5)
def __init__ | ( | self, | |
args | |||
) |
Definition at line 72 of file pstats.py.
References Stats.add(), MyAI.init(), TrafficAI.init(), waitjump.init(), ai_escortpatrol.init(), and Stats.init().
def add | ( | self, | |
arg_list | |||
) |
Definition at line 135 of file pstats.py.
References SymbolTable.__class__, Stats.add(), pstats.add_func_stats(), Stats.fcn_list, Stats.files, Stats.max_name_len, Stats.prim_calls, Stats.stats, Profile.stats, Stats.top_level, Stats.total_calls, and Stats.total_tt.
def calc_callees | ( | self) |
Definition at line 263 of file pstats.py.
References Stats.all_callees, Stats.stats, and Profile.stats.
def eval_print_amount | ( | self, | |
sel, | |||
list, | |||
msg | |||
) |
def get_print_list | ( | self, | |
sel_list | |||
) |
Definition at line 304 of file pstats.py.
References Stats.eval_print_amount(), Stats.fcn_list, pstats.func_std_string(), Stats.max_name_len, Stats.sort_type, Stats.stats, and Profile.stats.
def get_sort_arg_defs | ( | self) |
Expand all abbreviations that are unique.
Definition at line 176 of file pstats.py.
References Stats.sort_arg_dict, and Stats.sort_arg_dict_default.
def get_top_level_stats | ( | self) |
Definition at line 125 of file pstats.py.
References pstats.func_std_string(), Stats.max_name_len, Stats.prim_calls, Stats.top_level, Stats.total_calls, and Stats.total_tt.
def ignore | ( | self) |
def load_stats | ( | self, | |
arg | |||
) |
Definition at line 103 of file pstats.py.
References SymbolTable.__class__, Stats.files, aifc.open(), Stats.stats, and Profile.stats.
def print_call_heading | ( | self, | |
name_size, | |||
column_title | |||
) |
def print_call_line | ( | self, | |
name_size, | |||
source, | |||
call_dict | |||
) |
Definition at line 379 of file pstats.py.
References pstats.f8(), pstats.func_std_string(), string.ljust(), Stats.stats, and Profile.stats.
def print_callees | ( | self, | |
amount | |||
) |
Definition at line 350 of file pstats.py.
References Stats.all_callees, Stats.calc_callees(), Stats.get_print_list(), Stats.print_call_heading(), and Stats.print_call_line().
def print_callers | ( | self, | |
amount | |||
) |
Definition at line 365 of file pstats.py.
References Stats.get_print_list(), Stats.print_call_heading(), Stats.print_call_line(), Stats.stats, and Profile.stats.
def print_line | ( | self, | |
func | |||
) |
Definition at line 399 of file pstats.py.
References pstats.f8(), pstats.func_std_string(), Stats.stats, Profile.stats, and locale.str().
def print_stats | ( | self, | |
amount | |||
) |
Definition at line 328 of file pstats.py.
References Stats.files, pstats.func_get_function_name(), Stats.get_print_list(), Stats.prim_calls, Stats.print_line(), Stats.print_title(), Stats.total_calls, and Stats.total_tt.
def reverse_order | ( | self) |
Definition at line 228 of file pstats.py.
References Stats.fcn_list.
def sort_stats | ( | self, | |
field | |||
) |
Definition at line 195 of file pstats.py.
References Stats.fcn_list, and Stats.get_sort_arg_defs().
def strip_dirs | ( | self) |
Definition at line 233 of file pstats.py.
References pstats.add_func_stats(), Stats.all_callees, Stats.fcn_list, pstats.func_std_string(), pstats.func_strip_path(), Stats.max_name_len, Stats.stats, Profile.stats, and Stats.top_level.
|
static |