[Python-checkins] CVS: python/dist/src/Lib profile.py,1.35,1.36
Tim Peters
tim_one@users.sourceforge.net
Sat, 06 Oct 2001 21:02:38 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv18607/python/Lib
Modified Files:
profile.py
Log Message:
Repair some longstanding comment errors:
+ The last index in the timing tuple is 4, not 5 (noted by Guido).
+ The poorly named trace_dispatch_i works with float return values too.
Index: profile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/profile.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** profile.py 2001/10/07 03:12:08 1.35
--- profile.py 2001/10/07 04:02:36 1.36
***************
*** 136,140 ****
to finish of each invocation of a function, including time spent in
all subfunctions.
! [5] = A dictionary indicating for each function name, the number of times
it was called by us.
"""
--- 136,140 ----
to finish of each invocation of a function, including time spent in
all subfunctions.
! [4] = A dictionary indicating for each function name, the number of times
it was called by us.
"""
***************
*** 203,212 ****
!
! # Dispatch routine for best timer program (return = scalar integer)
def trace_dispatch_i(self, frame, event, arg):
timer = self.timer
! t = timer() - self.t # - 1 # Integer calibration constant
if self.dispatch[event](self, frame,t):
self.t = timer()
--- 203,212 ----
! # Dispatch routine for best timer program (return = scalar, fastest if
! # an integer but float works too -- and time.clock() relies on that).
def trace_dispatch_i(self, frame, event, arg):
timer = self.timer
! t = timer() - self.t # - 1 # calibration constant
if self.dispatch[event](self, frame,t):
self.t = timer()