Пример #1
0
 def __init__(self, logfn, lineevents=0, linetimings=1):
     self.lineevents = lineevents and 1 or 0
     self.linetimings = linetimings and lineevents and 1 or 0
     self._prof = p = _hotshot.profiler(logfn, self.lineevents, self.linetimings)
     if self.__class__ is Profile:
         self.close = p.close
         self.start = p.start
         self.stop = p.stop
         self.addinfo = p.addinfo
Пример #2
0
 def __init__(self, logfn, lineevents=0, linetimings=1):
     self.lineevents = lineevents and 1 or 0
     self.linetimings = linetimings and lineevents and 1 or 0
     self._prof = p = _hotshot.profiler(logfn, self.lineevents, self.linetimings)
     if self.__class__ is Profile:
         self.close = p.close
         self.start = p.start
         self.stop = p.stop
         self.addinfo = p.addinfo
Пример #3
0
    def __init__(self, logfn, lineevents=0, linetimings=1):
        self.lineevents = lineevents and 1 or 0
        self.linetimings = (linetimings and lineevents) and 1 or 0
        self._prof = p = _hotshot.profiler(
            logfn, self.lineevents, self.linetimings)

        # Attempt to avoid confusing results caused by the presence of
        # Python wrappers around these functions, but only if we can
        # be sure the methods have not been overridden or extended.
        if self.__class__ is Profile:
            self.close = p.close
            self.start = p.start
            self.stop = p.stop
            self.addinfo = p.addinfo
Пример #4
0
"""High-perfomance logging profiler, mostly written in C."""
Пример #5
0
"""High-perfomance logging profiler, mostly written in C."""
Пример #6
0
 def __init__(self, logfn, lineevents=0, linetimings=1):
     self.lineevents = lineevents and 1 or 0
     self.linetimings = (linetimings and lineevents) and 1 or 0
     self._prof = p = _hotshot.profiler(
         logfn, self.lineevents, self.linetimings)
Пример #7
0
 def __init__(self, logfn, lineevents=0, linetimings=1):
     self.lineevents = lineevents and 1 or 0
     self.linetimings = (linetimings and lineevents) and 1 or 0
     self._prof = p = _hotshot.profiler(logfn, self.lineevents,
                                        self.linetimings)