Run the profiler on _view_func_.
199153
def process_view(self, request, view_func, view_args, view_kwargs):
        """"""
        profiler = getattr(request, 'profiler', None)
        if profiler:
            # Make sure profiler variables don't get passed into view_func
            original_get = request.GET
            request.GET = original_get.copy()
            request.GET.pop('profile', None)
            request.GET.pop('show_queries', None)
            request.GET.pop('show_stats', None)
            try:
                return profiler.runcall(
                    view_func, request, *view_args, **view_kwargs
                )
            finally:
                request.GET = original_get
1181579
public void run(IProgressMonitor monitor) {
    try {
      page.createType(monitor);
    } catch (CoreException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (InterruptedException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
575894
public function run()
    {
        if ($this->unRegister() && empty(static::$keys[$this->getKey()])) {
            call_user_func_array($this->callback, $this->arguments);
        }
    }
1157481
def StartTiming(self, profile_name):
    
    if profile_name not in self._profile_measurements:
      self._profile_measurements[profile_name] = CPUTimeMeasurement()

    self._profile_measurements[profile_name].SampleStart()
850644
def dispatch(self, category, func, *args):
        """"""
        self.factory.loader.runPlugins(category, func, self, *args)
443447
def run(self):
    """"""

    if not (self._watchman and self._watchman.is_alive()):
      raise PantsService.ServiceError('watchman is not running, bailing!')

    # Enable watchman for the build root.
    self._watchman.watch_project(self._build_root)

    subscriptions = list(self._handlers.values())

    # Setup subscriptions and begin the main event firing loop.
    for handler_name, event_data in self._watchman.subscribed(self._build_root, subscriptions):
      self._state.maybe_pause()
      if self._state.is_terminating:
        break

      if event_data:
        # As we receive events from watchman, trigger the relevant handlers.
        self.fire_callback(handler_name, event_data)
1037469
def start(self, user_func, refresh):
		
		self.update=user_func
		self.refresh=refresh
		self.error=None

		# First load
		self.update()
		self.commit()

		# Start updater thread
		up = threading.Thread(None,self.main_update,"Updater")
		up.daemon = True
		up.start()

		# Main loop
		while up.isAlive(): # Do not serve data if the Updater thread has died
			try:
				self.main_passpersist()
			except:
				up._Thread__stop()
				raise
711183
def _profile(self, frame, event, arg):
        """"""
        # c = event.startswith('c_')
        if event.startswith('c_'):
            return
        time1 = self.timer()
        frames = self.frame_stack(frame)
        if frames:
            frames.pop()
        parent_stats = self.stats
        for f in frames:
            parent_stats = parent_stats.ensure_child(f.f_code, void)
        code = frame.f_code
        frame_key = id(frame)
        # if c:
        #     event = event[2:]
        #     code = mock_code(arg.__name__)
        #     frame_key = id(arg)
        # record
        time2 = self.timer()
        self.overhead += time2 - time1
        if event == 'call':
            time = time2 - self.overhead
            self.record_entering(time, code, frame_key, parent_stats)
        elif event == 'return':
            time = time1 - self.overhead
            self.record_leaving(time, code, frame_key, parent_stats)
        time3 = self.timer()
        self.overhead += time3 - time2
228794
def run(self):
        """"""
        self.signal_init()
        self.listen_init()
        self.logger.info('starting')
        self.loop.start()
166518
def run(self):
        
        with open('src/lsqfit/__init__.py', 'a') as lsfile:
            lsfile.write("\n__version__ = '%s'\n" % LSQFIT_VERSION)
        _build_py.run(self)
1175630
def profile(func):
    
    @inlineCallbacks
    def callme(*args, **kwargs):
        start = time.time()
        ret = yield func(*args, **kwargs)
        time_to_execute = time.time() - start
        log.msg('%s executed in %.3f seconds' % (func.__name__, time_to_execute))
        returnValue(ret)
    return callme
805787
def execute(func, handler, args, kwargs):
    
    tracing = handler.settings.get('opentracing_tracing')

    with tracer_stack_context():
        if tracing._trace_all:
            attrs = handler.settings.get('opentracing_traced_attributes', [])
            tracing._apply_tracing(handler, attrs)

        return func(*args, **kwargs)
834131
def run(self):
        """"""
        if win_based:
            raise NotImplementedError("Please run main_loop, "
                                      "backgrounding not supported on Windows")
        self.background_process = mp.Process(target=self.main_loop)
        self.background_process.start()
1098992
def run(self):
        """"""
        if ProfileCollection and isinstance(self.mloginfo.logfile,
                                            ProfileCollection):
            print("\n    not available for system.profile collections\n")
            return

        for version, logevent in self.mloginfo.logfile.restarts:
            print("   %s version %s"
                  % (logevent.datetime.strftime("%b %d %H:%M:%S"), version))

        if len(self.mloginfo.logfile.restarts) == 0:
            print("  no restarts found")
209785
def run(self):
        """"""
        try:
            if self._target:
                return_value = self._target(*self._args, **self._kwargs)
                if return_value is not None:
                    self._exception = OrphanedReturn(self, return_value)
        except BaseException as err:
            self._exception = err
        finally:
            # Avoid a refcycle if the thread is running a function with
            # an argument that has a member that points to the thread.
            del self._target, self._args, self._kwargs
411753
static function start($flag = 0, array $ignoreFunctions = array())
    {
        if (self::$sample) {
            throw new \RuntimeException('The profiler has been started');
        }

        self::$sample = new XhprofSample($flag, $ignoreFunctions);

        xhprof_enable($flag, $ignoreFunctions);
    }
645004
def run(self):
        """"""
        self.api = self.context.get("cls")(self.context)
        self.context["inst"].append(self)  # Adapters used by strategies

        for call, calldata in self.context.get("calls", {}).items():
            def loop():
                """Loop on event scheduler, calling calls"""
                while not self.stopped.wait(calldata.get("delay", None)):
                    self.call(call, calldata.get("arguments", None))

            self.thread[call] = Process(target=loop)
            self.thread[call].start()