コード例 #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
ファイル: hotshot__init__.py プロジェクト: aevitas/wotsdk
 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
ファイル: __init__.py プロジェクト: mcyril/ravel-ftn
"""High-perfomance logging profiler, mostly written in C."""
コード例 #5
0
ファイル: __init__.py プロジェクト: mcyril/ravel-ftn
"""High-perfomance logging profiler, mostly written in C."""
コード例 #6
0
ファイル: __init__.py プロジェクト: doom38/jython_v2.2.1
 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)