Home | History | Annotate | Download | only in scripts

Lines Matching refs:profile

12 If you're running a script you want to profile, a simple way to get

39 def has_pairs(profile):
40 """Returns True if the Python that produced the argument profile
43 return len(profile) > 0 and isinstance(profile[0], list)
47 """Forgets any execution profile that has been gathered so far."""
49 sys.getdxp() # Resets the internal profile
72 """Returns the cumulative execution profile until this call."""
78 def common_instructions(profile):
85 if has_pairs(profile) and profile:
86 inst_list = profile[-1]
88 inst_list = profile
96 def common_pairs(profile):
105 if not has_pairs(profile):
109 for op1, op1profile in enumerate(profile[:-1])
116 def render_common_pairs(profile=None):
124 if profile is None:
125 profile = snapshot_profile()
127 for _, ops, count in common_pairs(profile):