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
Exemple #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
Exemple #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
Exemple #4
0
"""High-perfomance logging profiler, mostly written in C."""
Exemple #5
0
"""High-perfomance logging profiler, mostly written in C."""
Exemple #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)
Exemple #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)