예제 #1
0
 def __init__(self, dirname=None, mode=ProfilerMode.PROF):
     # type: (str, ProfilerMode) -> None
     if not dirname:
         dirname = get_profiler_dir()
     if not os.path.isdir(dirname):
         os.mkdir(dirname)
     self.dirname = dirname
     self.mode = mode
     self.start_time = None
     self.running = False
     self.stopping = False
     self.stacks = []
     sig = mode.value[1]
     signal.signal(sig, self.handler)
     signal.siginterrupt(sig, False)
예제 #2
0
 def __init__(self, name: APartName = "profiles") -> None:
     super().__init__(name)
     options.datadir = get_profiler_dir()
예제 #3
0
 def __init__(self, name="profiles"):
     # type: (APartName) -> None
     super(ProfilingViewerPart, self).__init__(name)
     options.datadir = get_profiler_dir()
     # Hooks
     self.register_hooked(ReportHandlersHook, self.report_handlers)