Example #1
0
 def __init__(self, parent=None):
     QObject.__init__(self, parent)
     Extension.__init__(self)
     if FlameProfiler.enabled():
         self.addMenuItem("Start BFG", startBFG)
         self.addMenuItem("Stop BFG", stopBFG)
     else:
         self.addMenuItem("<Profiling not activated>", noOp)
Example #2
0
def profileEmit(func):
    if FlameProfiler.enabled():
        @functools.wraps(func)
        def wrapped(self, *args, **kwargs):
            FlameProfiler.updateProfileConfig()
            if FlameProfiler.isRecordingProfile():
                with FlameProfiler.profileCall("[SIG] " + self.getName()):
                    func(self, *args, **kwargs)
            else:
                func(self, *args, **kwargs)
        return wrapped

    else:
        return func
Example #3
0
def profileEmit(function):
    if FlameProfiler.enabled():
        @functools.wraps(function)
        def wrapped(self, *args, **kwargs):
            FlameProfiler.updateProfileConfig()
            if FlameProfiler.isRecordingProfile():
                with FlameProfiler.profileCall("[SIG] " + self.getName()):
                    function(self, *args, **kwargs)
            else:
                function(self, *args, **kwargs)
        return wrapped

    else:
        return function
Example #4
0
def _recordSignalNames():
    return FlameProfiler.enabled()
Example #5
0
def _recordSignalNames():
    return FlameProfiler.enabled()