예제 #1
0
 def process(self, message):
     if hasattr(message, 'save_snapshot'):
         self.save_snapshot(
             message.id,
             generate_snapshot_filepath(message.save_snapshot.filepath,
                                        remote_run), remote_run)
     else:
         raise AssertionError("Unknown request %s" % dir(message))
    def run(self, file):
        m = save_main_module(file, 'run_profiler')
        globals = m.__dict__
        try:
            globals['__builtins__'] = __builtins__
        except NameError:
            pass  # Not there on Jython...

        self.start_profiling()

        pydev_imports.execfile(file, globals, globals)  # execute the script

        self.stop_profiling()
        self.save_snapshot(0, generate_snapshot_filepath(base_snapshot_path))
예제 #3
0
    def run(self, file):
        m = save_main_module(file, 'run_profiler')
        globals = m.__dict__
        try:
            globals['__builtins__'] = __builtins__
        except NameError:
            pass  # Not there on Jython...

        self.start_profiling()

        try:
            execfile(file, globals, globals)  # execute the script
        finally:
            self.stop_profiling()
            self.save_snapshot(0, generate_snapshot_filepath(base_snapshot_path, remote_run, self.snapshot_extension()), remote_run)
예제 #4
0
    def run(self, file):
        m = save_main_module(file, 'run_profiler')
        globals = m.__dict__
        try:
            globals['__builtins__'] = __builtins__
        except NameError:
            pass  # Not there on Jython...

        self.start_profiling()

        pydev_imports.execfile(file, globals, globals)  # execute the script

        self.stop_profiling()
        self.save_snapshot(
            0, generate_snapshot_filepath(base_snapshot_path, remote_run),
            remote_run)
 def process(self, message):
     if hasattr(message, 'save_snapshot'):
         self.save_snapshot(message.id, generate_snapshot_filepath(message.save_snapshot.filepath))
     else:
         raise AssertionError("Unknown request %s" % dir(message))