"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Cheetah/Utils/statprof.py" between
cheetah3-3.1.0.tar.gz and cheetah3-3.2.0.tar.gz

About: Cheetah3 is a template engine and code generation tool for e.g. for Web development or Java, SQL, LaTeX, form email ... (written in Python).

statprof.py  (cheetah3-3.1.0):statprof.py  (cheetah3-3.2.0)
skipping to change at line 160 skipping to change at line 160
def reset(self, frequency=None): def reset(self, frequency=None):
# total so far # total so far
self.accumulated_time = 0.0 self.accumulated_time = 0.0
# start_time when timer is active # start_time when timer is active
self.last_start_time = None self.last_start_time = None
# total count of sampler calls # total count of sampler calls
self.sample_count = 0 self.sample_count = 0
# a float # a float
if frequency: if frequency:
self.sample_interval = 1.0/frequency self.sample_interval = 1.0 / frequency
elif not hasattr(self, 'sample_interval'): elif not hasattr(self, 'sample_interval'):
# default to 100 Hz # default to 100 Hz
self.sample_interval = 1.0/100.0 self.sample_interval = 1.0 / 100.0
else: else:
# leave the frequency as it was # leave the frequency as it was
pass pass
self.remaining_prof_time = None self.remaining_prof_time = None
# for user start/stop nesting # for user start/stop nesting
self.profile_level = 0 self.profile_level = 0
# whether to catch apply-frame # whether to catch apply-frame
self.count_calls = False self.count_calls = False
# gc time between start() and stop() # gc time between start() and stop()
self.gc_time_taken = 0 self.gc_time_taken = 0
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)